[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - hwpfilter/source

Caolán McNamara caolanm at redhat.com
Mon Aug 7 20:30:47 UTC 2017


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

New commits:
commit c349ea47a72c92d39aed4649afe493dc7911229e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 3 14:37:30 2017 +0100

    ofz#2846 null deref
    
    Change-Id: I88b61d7a4faaed118db8df6f99cef08310c1f2eb
    Reviewed-on: https://gerrit.libreoffice.org/40726
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx
index 608fd0371da2..72aee0f3974a 100644
--- a/hwpfilter/source/hwpread.cxx
+++ b/hwpfilter/source/hwpread.cxx
@@ -431,6 +431,13 @@ bool Picture::Read(HWPFile & hwpf)
     UpdateBBox(this);
     if( pictype != PICTYPE_DRAW )
         style.cell = reserved3;
+    else
+    {
+        //picinfo.picun read above is unioned with
+        //picinfo.picdraw and so wrote to the hdo pointer
+        //value, which is definitely not useful to us
+        picinfo.picdraw.hdo = nullptr;
+    }
 
     if (follow_block_size != 0)
     {


More information about the Libreoffice-commits mailing list