diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-02-27 17:29:38 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-02-27 20:59:21 +0100 |
commit | d71aa209aec6adbd273497e240ae447e81ed9c05 (patch) | |
tree | 25d886f0cb379273adb54866c5779b8adfa9e3b7 /hwpfilter | |
parent | f36a582dc24816d23bf0629b72a15cac22b42870 (diff) |
ofz#45090 Null-dereference READ
Change-Id: I74c1c0d1a090dbd763336fec845e29d6cc0065f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130651
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/hwpreader.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index f31f1e779e60..b424820eead8 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -2296,7 +2296,7 @@ void HwpReader::makeCaptionStyle(FBoxStyle * fstyle) padd("style:vertical-rel", sXML_CDATA, "paragraph"); padd("style:horizontal-pos", sXML_CDATA, "from-left"); padd("style:horizontal-rel", sXML_CDATA, "paragraph"); - if( fstyle->boxtype == 'G' ) + if (fstyle->boxtype == 'G' && fstyle->cell) { char *cell = static_cast<char *>(fstyle->cell); padd("draw:luminance", sXML_CDATA, @@ -2310,7 +2310,7 @@ void HwpReader::makeCaptionStyle(FBoxStyle * fstyle) else if( cell[2] == 2 ) padd("draw:color-mode", sXML_CDATA, "mono"); } - else + else if (fstyle->cell) { Cell *cell = static_cast<Cell *>(fstyle->cell); if(cell->linetype[0] == cell->linetype[1] && |