hwpfilter/source/hwpreader.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
New commits: commit c695c60be9fb7028b3176869400be2b11c6268ec Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Mar 4 16:47:33 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Mar 4 22:38:37 2022 +0100 ofz: Null-dereference Change-Id: I01be4c06c6d97430953ada8f3f5f84ef0a389267 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131032 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index 91c4bdd7784b..cb484b4fa814 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -4457,7 +4457,8 @@ void HwpReader::makeFootnote(Footnote * hbox) chars(OUString::number(hbox->number)); endEl("text:endnote-citation"); startEl("text:endnote-body"); - parsePara(hbox->plist.front().get()); + if (!hbox->plist.empty()) + parsePara(hbox->plist.front().get()); endEl("text:endnote-body"); endEl("text:endnote"); } @@ -4472,7 +4473,8 @@ void HwpReader::makeFootnote(Footnote * hbox) chars(OUString::number(hbox->number)); endEl("text:footnote-citation"); startEl("text:footnote-body"); - parsePara(hbox->plist.front().get()); + if (!hbox->plist.empty()) + parsePara(hbox->plist.front().get()); endEl("text:footnote-body"); endEl("text:footnote"); } commit d3e0159a3e510f1d3202d1c7d3d652be9152a314 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Mar 4 16:25:47 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Mar 4 22:38:20 2022 +0100 ofz: Null-dereference Change-Id: I7d8e30dc85df3cc5800617e5b2f232136bb72cdd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131006 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index 9bb15364a0c3..91c4bdd7784b 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -3510,7 +3510,7 @@ void HwpReader::makeTextBox(TxtBox * hbox) { makeTable(hbox); } - else // Is TextBox + else if (!hbox->plists[0].empty()) // Is TextBox { parsePara(hbox->plists[0].front().get()); } @@ -3524,7 +3524,7 @@ void HwpReader::makeTextBox(TxtBox * hbox) if( hbox->style.cap_len > 0 && hbox->type == TXT_TYPE) { endEl("text:p"); - if( !(hbox->cap_pos % 2)) + if (!(hbox->cap_pos % 2) && !hbox->caption.empty()) { parsePara(hbox->caption.front().get()); }