[Libreoffice-commits] core.git: sw/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Mon Oct 21 16:33:48 UTC 2019
sw/source/filter/ww8/ww8scan.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 1581c0d4c43b3516ec5f7cdeea63b3ffe3b6b22d
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Oct 21 15:50:16 2019 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Oct 21 18:32:26 2019 +0200
-fsanitize=nullptr-with-nonzero-offset
...(new with Clang 10 trunk), as seen during CppunitTest_sw_ww8export:
> sw/source/filter/ww8/ww8scan.cxx:5640:38: runtime error: applying non-zero offset 22 to null pointer
> #0 in WW8PLCFxDesc::Restore(WW8PLCFxSave1 const&) at sw/source/filter/ww8/ww8scan.cxx:5640:38
> #1 in WW8PLCFMan::RestoreAllPLCFx(WW8PLCFxSaveAll const&) at sw/source/filter/ww8/ww8scan.cxx:5159:21
> #2 in WW8ReaderSave::Restore(SwWW8ImplReader*) at sw/source/filter/ww8/ww8par.cxx:2081:27
> #3 in SwWW8ImplReader::Read_HdFtFootnoteText(SwNodeIndex const*, int, int, ManTypes) at sw/source/filter/ww8/ww8par.cxx:2100:11
> #4 in SwWW8ImplReader::End_Footnote() at sw/source/filter/ww8/ww8par2.cxx:233:9
> #5 in SwWW8ImplReader::EndExtSprm(unsigned short) at sw/source/filter/ww8/ww8par6.cxx:5272:9
> #6 in SwWW8ImplReader::ReadTextAttr(int&, long, bool&, int) at sw/source/filter/ww8/ww8par.cxx:3867:17
> #7 in SwWW8ImplReader::ReadAttrs(int&, int&, long, bool&) at sw/source/filter/ww8/ww8par.cxx:3959:21
> #8 in SwWW8ImplReader::ReadText(int, int, ManTypes) at sw/source/filter/ww8/ww8par.cxx:4041:9
> #9 in SwWW8ImplReader::CoreLoad(WW8Glossary const*) at sw/source/filter/ww8/ww8par.cxx:5236:9
> #10 in SwWW8ImplReader::LoadThroughDecryption(WW8Glossary*) at sw/source/filter/ww8/ww8par.cxx:5900:19
> #11 in SwWW8ImplReader::LoadDoc(WW8Glossary*) at sw/source/filter/ww8/ww8par.cxx:6204:19
> #12 in WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) at sw/source/filter/ww8/ww8par.cxx:6355:26
> #13 in SwReader::Read(Reader const&) at sw/source/filter/basflt/shellio.cxx:188:22
> #14 in SwDocShell::ConvertFrom(SfxMedium&) at sw/source/uibase/app/docsh.cxx:261:26
> #15 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:768:23
> #16 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1851:36
> #17 in (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at sfx2/source/view/frmload.cxx:691:28
> #18 in framework::LoadEnv::impl_loadContent() at framework/source/loadenv/loadenv.cxx:1157:37
> #19 in framework::LoadEnv::startLoading() at framework/source/loadenv/loadenv.cxx:390:20
> #20 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/loadenv/loadenv.cxx:171:14
> #21 in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx:621:12
> #23 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at unotest/source/cpp/macros_test.cxx:48:62
> #24 in SwModelTestBase::reload(char const*, char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:827:23
> #25 in SwModelTestBase::executeImportExportImportTest(char const*, char const*) at sw/qa/extras/inc/swmodeltestbase.hxx:292:9
> #26 in testFdo46020::Import_Export_Import() at sw/qa/extras/ww8export/ww8export.cxx:764:1
I have no idea whether aD.pMemPos can legitimately be null here, whether this is
due to some previous processing error, or...
Change-Id: I956423b6a9683d862b48479033b047c40df0acc0
Reviewed-on: https://gerrit.libreoffice.org/81241
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 841f564e2ace..142d20c8ee98 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -5637,7 +5637,7 @@ void WW8PLCFxDesc::Restore( const WW8PLCFxSave1& rSave )
else
{
nSprmsLen = nOrigSprmsLen - rSave.nPLCFxMemOfs;
- pMemPos = aD.pMemPos + rSave.nPLCFxMemOfs;
+ pMemPos = aD.pMemPos == nullptr ? nullptr : aD.pMemPos + rSave.nPLCFxMemOfs;
}
}
}
More information about the Libreoffice-commits
mailing list