[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - lotuswordpro/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 23 08:52:23 UTC 2020
lotuswordpro/source/filter/lwpcelllayout.cxx | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit bd20ad2f2bab67af2777874f4b403314249cfc0b
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Nov 22 20:13:13 2020 +0000
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Mon Nov 23 09:51:29 2020 +0100
ofz#27756 null deref
Change-Id: Iccbd368a69f86abe7c7c72df8158db98eaf2bc58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106239
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/lotuswordpro/source/filter/lwpcelllayout.cxx b/lotuswordpro/source/filter/lwpcelllayout.cxx
index ddf04483817c..3fdcf3caca21 100644
--- a/lotuswordpro/source/filter/lwpcelllayout.cxx
+++ b/lotuswordpro/source/filter/lwpcelllayout.cxx
@@ -71,6 +71,8 @@
#include <lwpfilehdr.hxx>
#include <lwpglobalmgr.hxx>
+#include <sal/log.hxx>
+
#include <xfilter/xfstylemanager.hxx>
#include <xfilter/xfcell.hxx>
#include <xfilter/xfcellstyle.hxx>
@@ -350,7 +352,11 @@ LwpPara* LwpCellLayout::GetLastParaOfPreviousStory()
if (pPreStoryID && !(pPreStoryID->IsNull()))
{
LwpStory* pPreStory = dynamic_cast<LwpStory*>(pPreStoryID->obj(VO_STORY).get());
- assert(pPreStory);
+ if (!pPreStory)
+ {
+ SAL_WARN("lwp", "unexpected null VO_STORY");
+ return nullptr;
+ }
return dynamic_cast<LwpPara*>(pPreStory->GetLastPara().obj(VO_PARA).get());
}
else
More information about the Libreoffice-commits
mailing list