[Libreoffice-commits] core.git: sw/qa

Tushar Bende tushar.bende at synerzip.com
Fri Feb 7 12:37:37 PST 2014


 sw/qa/extras/ooxmlexport/data/test_segfault_while_save.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx                    |    9 +++++++++
 2 files changed, 9 insertions(+)

New commits:
commit 1edca1fe0aaadbd48ea23b691dc244ad2a6b6f73
Author: Tushar Bende <tushar.bende at synerzip.com>
Date:   Thu Feb 6 15:45:30 2014 +0530

    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 at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/qa/extras/ooxmlexport/data/test_segfault_while_save.docx b/sw/qa/extras/ooxmlexport/data/test_segfault_while_save.docx
new file mode 100644
index 0000000..1c364dd
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/test_segfault_while_save.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index a192a3d..1284699 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();


More information about the Libreoffice-commits mailing list