diff options
author | Tushar Bende <tushar.bende@synerzip.com> | 2014-02-06 15:45:30 +0530 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-07 20:37:16 +0000 |
commit | 1edca1fe0aaadbd48ea23b691dc244ad2a6b6f73 (patch) | |
tree | e94191161b62d2dea622530b2ee5bce8292b9520 | |
parent | bba69a3449598eddc465e3467e52ff975fd81938 (diff) |
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 4de30fa7fd6abb5c2ea2b63a0e306954f7acc1b1 here is the export test.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Change-Id: I0ab4bbf2126abbfa0fa37d2156aa3390ded0997c
Reviewed-on: https://gerrit.libreoffice.org/7894
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/test_segfault_while_save.docx | bin | 0 -> 55619 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 9 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/test_segfault_while_save.docx b/sw/qa/extras/ooxmlexport/data/test_segfault_while_save.docx Binary files differnew file mode 100644 index 000000000000..1c364dd0dedf --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/test_segfault_while_save.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index a192a3d6cc35..1284699ca6e1 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -2859,6 +2859,15 @@ DECLARE_OOXMLEXPORT_TEST(testPageref, "testPageref.docx") 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 CPPUNIT_PLUGIN_IMPLEMENT(); |