hwpfilter/source/hwpreader.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit d71aa209aec6adbd273497e240ae447e81ed9c05 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Feb 27 17:29:38 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun Feb 27 20:59:21 2022 +0100 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 <caol...@redhat.com> 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] &&