Kaydet (Commit) 1edca1fe authored tarafından Tushar Bende's avatar Tushar Bende Kaydeden (comit) Caolán McNamara

fdo#74499: - FILESAVE:System throws a segmentation fault while saving files

Description: Docx containing text frame giving segmentation fault while saving file.
Reason found is inside writeDMLTextFrame() it was getting SdrObject pointer which is NULL
and accessing this NULL pointer was giving seg fault.
issue is fixed with commit 4de30fa7 here is the export test.

Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Change-Id: I0ab4bbf2126abbfa0fa37d2156aa3390ded0997c
Reviewed-on: https://gerrit.libreoffice.org/7894Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst bba69a34
...@@ -2859,6 +2859,15 @@ DECLARE_OOXMLEXPORT_TEST(testPageref, "testPageref.docx") ...@@ -2859,6 +2859,15 @@ DECLARE_OOXMLEXPORT_TEST(testPageref, "testPageref.docx")
CPPUNIT_ASSERT(contents.match("PAGEREF _Toc355095261 \\h")); CPPUNIT_ASSERT(contents.match("PAGEREF _Toc355095261 \\h"));
} }
DECLARE_OOXMLEXPORT_TEST(testSegFaultWhileSave, "test_segfault_while_save.docx")
{
// fdo#74499
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
if (!pXmlDoc)
return;
CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblGrid/w:gridCol[2]", "w").match("6138"));
}
#endif #endif
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment