hwpfilter/source/hwpread.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 2ce3a134dffca12ea88ef86a95e8d160ca75de16
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Fri Mar 11 17:29:41 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Mar 21 17:08:25 2022 +0100

    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.st...@allotropia.de>
    (cherry picked from commit 4c86ed851bc1c0a2414e254082064760c99437f1)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131589
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    (cherry picked from commit dc566a7f687a728311490b5f4f624897f0aefd1d)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131594
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx
index e04e4aa72f6c..a301170accb9 100644
--- a/hwpfilter/source/hwpread.cxx
+++ b/hwpfilter/source/hwpread.cxx
@@ -457,6 +457,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);

Reply via email to