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



commit d2a140fe0098f7881270d84e8f106f2b2f457d75
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Fri Jun 14 14:06:20 2013 -0600

    Fix crash on corrupted files.  [#702285]
    
    2013-06-14  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-read.c (odf_custom_shape_end): consider the possibility
        of missing path information.

 NEWS                                 |    3 +--
 plugins/openoffice/ChangeLog         |    5 +++++
 plugins/openoffice/openoffice-read.c |   18 +++++++++++-------
 3 files changed, 17 insertions(+), 9 deletions(-)
---
diff --git a/NEWS b/NEWS
index cf1a22e..afb5ba0 100644
--- a/NEWS
+++ b/NEWS
@@ -23,8 +23,7 @@ Andreas:
          export [#702169]
        * Fix ODF crash. [#702197]
        * In ODF import ignored mentioned but not included sheets. [#698388]
-       * Fix crash on bogus ODF file.  [#702205]
-       * Fix crash on bogus gnumeric file.  [#702219]
+       * Fix crash on corrupted files.  [#702205] [#702219] [#702285]
        * Some documentation improvements. [Debian #621735]
 
 Darrell Tangman:
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 65d3778..04774ed 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-14  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * openoffice-read.c (odf_custom_shape_end): consider the possibility
+       of missing path information.
+
 2013-06-13  Andreas J. Guelzow <aguelzow pyrshep ca>
 
        * openoffice-read.c (unset_gvalue): deleted
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index b8ad7a9..35eda98 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -9542,15 +9542,19 @@ odf_custom_shape_end (GsfXMLIn *xin, GsfXMLBlob *blob)
                        g_list_free (keys);
                }
        }
+
        paths = g_ptr_array_new_with_free_func ((GDestroyNotify) go_path_free);
-       strs = g_strsplit (state->chart.cs_enhanced_path, " N", 0);
-       for (cur = strs; *cur != NULL; cur++) {
-               path = go_path_new_from_odf_enhanced_path (*cur, vals);
-               if (path)
-                       g_ptr_array_add (paths, path);
+       
+       if (state->chart.cs_enhanced_path != NULL) {
+               strs = g_strsplit (state->chart.cs_enhanced_path, " N", 0);
+               for (cur = strs; *cur != NULL; cur++) {
+                       path = go_path_new_from_odf_enhanced_path (*cur, vals);
+                       if (path)
+                               g_ptr_array_add (paths, path);
+               }
+               g_strfreev (strs);
        }
-       g_strfreev (strs);
-
+       
        if (vals)
                g_hash_table_unref (vals);
 


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