summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-02-24 08:39:33 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-02-24 11:59:29 +0100
commit7d2785e37fee0b55c3751d94336320495b0b408e (patch)
tree9dd6f7d4997f2a1df4fcfe2c1202685ae724926d
parentc893c0e359b82be71107e064bd2266c6daff81d7 (diff)
ofz#44992 Null-dereference
Change-Id: I8b0251644769b490da97e6b0f97a320279f926f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130473 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--hwpfilter/qa/cppunit/data/pass/ofz44992-1.hwpbin0 -> 1710 bytes
-rw-r--r--hwpfilter/source/hwpreader.cxx3
2 files changed, 2 insertions, 1 deletions
diff --git a/hwpfilter/qa/cppunit/data/pass/ofz44992-1.hwp b/hwpfilter/qa/cppunit/data/pass/ofz44992-1.hwp
new file mode 100644
index 000000000000..1b46c9751396
--- /dev/null
+++ b/hwpfilter/qa/cppunit/data/pass/ofz44992-1.hwp
Binary files differ
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 923d81f32cc8..40bd3186c288 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -1451,7 +1451,8 @@ void HwpReader::makePStyle(ParaShape const * pshape)
rstartEl("style:style", mxList);
mxList->clear();
parseParaShape(pshape);
- parseCharShape(pshape->cshape.get());
+ if (pshape->cshape)
+ parseCharShape(pshape->cshape.get());
rstartEl("style:properties", mxList);
mxList->clear();