summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-03-11 17:29:41 +0100
committerAron Budea <aron.budea@collabora.com>2022-08-10 23:05:44 +0200
commit859bdd4817e50d3d7ca217e03628bfb7db9076f5 (patch)
treefd67b2a52330a7f5a02d5bfc000e479f2b7f5932 /hwpfilter
parent6704ee9191bd1c637f587dff9998ad88395d9dd1 (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/+/131593 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> (cherry picked from commit eb84cf3f406808658f3efd9320e0a047c90be12f)
Diffstat (limited to 'hwpfilter')
-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 36fb77996c56..5b25025cdf6d 100644
--- a/hwpfilter/source/hwpread.cxx
+++ b/hwpfilter/source/hwpread.cxx
@@ -451,6 +451,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);