[gnumeric] Fix crash on bogus ODF file. [#702205]



commit 6fb923bb3924b4177ab78f5b2ff3e272ad474cfb
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Thu Jun 13 19:31:39 2013 -0600

    Fix crash on bogus ODF file.  [#702205]
    
    2013-06-13  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * openoffice-read.c (unset_gvalue): deleted
        (openoffice_file_open): use teh correct GDestroyNotify

 NEWS                                 |    1 +
 plugins/openoffice/ChangeLog         |    5 +++++
 plugins/openoffice/openoffice-read.c |   12 ++----------
 3 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/NEWS b/NEWS
index 4039b81..3b4338a 100644
--- a/NEWS
+++ b/NEWS
@@ -23,6 +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]
 
 Darrell Tangman:
        * Update documentation for Edit and Insert menus. [#700596]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 74f8242..65d3778 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,10 @@
 2013-06-13  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+       * openoffice-read.c (unset_gvalue): deleted
+       (openoffice_file_open): use teh correct GDestroyNotify
+
+2013-06-13  Andreas J. Guelzow <aguelzow pyrshep ca>
+
        * openoffice-read.c (openoffice_file_open): delete any tables that
        were referred to but not included in the file.
 
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 17455cf..b8ad7a9 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -10086,12 +10086,6 @@ odf_selection_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
 /******************************** settings.xml ******************************/
 
 static void
-unset_gvalue (gpointer data, G_GNUC_UNUSED gpointer user_data)
-{
-       g_value_unset (data);
-}
-
-static void
 destroy_gvalue (gpointer data)
 {
        g_value_unset (data);
@@ -12096,10 +12090,8 @@ openoffice_file_open (G_GNUC_UNUSED GOFileOpener const *fo, GOIOContext *io_cont
                if (state.settings.stack != NULL) {
                        go_cmd_context_error_import (GO_CMD_CONTEXT (io_context),
                                                     _("settings.xml stream is malformed!"));
-                       g_slist_foreach (state.settings.stack,
-                                        (GFunc)unset_gvalue,
-                                        NULL);
-                       g_slist_free_full (state.settings.stack, g_free);
+                       g_slist_free_full (state.settings.stack, 
+                                          (GDestroyNotify) g_hash_table_unref);
                        state.settings.stack = NULL;
                }
 


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