[gnumeric] Fix crash on corrupted files. [#702486]



commit 9c56c80cf620494463cbee8476dfe5739cb96911
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Mon Jun 17 10:42:20 2013 -0600

    Fix crash on corrupted files. [#702486]
    
    2013-06-17  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-read.c (odf_annotation_end): check whether we have
        indeed text

 NEWS                                 |    2 +-
 plugins/openoffice/ChangeLog         |    5 +++++
 plugins/openoffice/openoffice-read.c |    2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index 11ec24e..1a42851 100644
--- a/NEWS
+++ b/NEWS
@@ -24,7 +24,7 @@ Andreas:
        * Fix ODF crash. [#702197]
        * In ODF import ignored mentioned but not included sheets. [#698388]
        * Fix crash on corrupted files.  [#702205] [#702219] [#702285]
-         [#702288] [#702322] [#702364] [#702409]
+         [#702288] [#702364] [#702409] [#702486]
        * Some documentation improvements. [Debian #621735] [Debian #530462]
        * Fix crash on xlsx import due to external references. [#702407] 
 
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 563696b..cce14a6 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,10 @@
 2013-06-17  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+       * openoffice-read.c (odf_annotation_end): check whether we have
+       indeed text
+
+2013-06-17  Andreas J. Guelzow <aguelzow pyrshep ca>
+
        * openoffice-read.c (openoffice_file_open): ensure we have no
        sheet-object left in partial construction
 
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index fec3b23..0d1f2b4 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -9164,7 +9164,7 @@ odf_annotation_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
 
        if (state->text_p_stack != NULL && (NULL != (ptr = state->text_p_stack->data)))
                g_object_set (G_OBJECT (state->cell_comment),
-                             "text", ptr->gstr->str,
+                             "text", ptr->gstr ? ptr->gstr->str : "",
                              "markup", ptr->attrs, NULL);
        state->cell_comment = NULL;
        odf_pop_text_p (state);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]