summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-03-11 17:29:41 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2022-03-18 15:19:24 +0100
commit0c5048143054e973f5cb945ddd61d50fa1aac0ab (patch)
tree99980ff848342d3e9036fba88c78576f8f4f95c9
parent72090be467eda13587964c25a0c125572f440a1e (diff)
hwpfilter: why isn't that path string null terminated
Change-Id: Iaedc23bd91d0d46e34d55dcc65760b73c5772b7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131559 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 4c86ed851bc1c0a2414e254082064760c99437f1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131589 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit dc566a7f687a728311490b5f4f624897f0aefd1d)
-rw-r--r--hwpfilter/source/hwpread.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx
index 1ef27f7c243f..7e0564b187a4 100644
--- a/hwpfilter/source/hwpread.cxx
+++ b/hwpfilter/source/hwpread.cxx
@@ -426,6 +426,7 @@ bool Picture::Read(HWPFile & hwpf)
scale[1] = tmp16;
hwpf.ReadBlock(picinfo.picun.path, 256); /* Picture File Name: when type is not a Drawing. */
+ picinfo.picun.path[255] = 0; // ensure null terminated
hwpf.ReadBlock(reserved3, 9); /* Brightness / Contrast / Picture Effect, etc. */
UpdateBBox(this);