summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-08-03 14:37:30 +0100
committerAndras Timar <andras.timar@collabora.com>2017-08-11 10:48:38 +0200
commit286e84b2bf619dcdb14760d5dee1c3c532501069 (patch)
tree3bcbc44952ba0f612d17c62c467e0fdc7959500b /hwpfilter
parent2cae2622fcf21d3c453dabacf78d3c36c1b038ac (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> (cherry picked from commit c349ea47a72c92d39aed4649afe493dc7911229e)
Diffstat (limited to 'hwpfilter')
-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)
{