summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-08-03 14:37:30 +0100
committerMichael Stahl <mstahl@redhat.com>2017-08-07 22:30:17 +0200
commitc349ea47a72c92d39aed4649afe493dc7911229e (patch)
tree709ad591630350f35063298ae4f301ccf356546d
parent133010a0efc8715f95e0ea0f66c22352dd55654a (diff)
ofz#2846 null deref
Change-Id: I88b61d7a4faaed118db8df6f99cef08310c1f2eb Reviewed-on: https://gerrit.libreoffice.org/40726 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--hwpfilter/source/hwpread.cxx7
1 files changed, 7 insertions, 0 deletions
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)
{