[gnumeric] .gnumeric: fix crash with corrupted file.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] .gnumeric: fix crash with corrupted file.
- Date: Wed, 19 Jun 2013 15:39:26 +0000 (UTC)
commit 355e9e6683e2ca96c591f2d802c9fe4a5716c41d
Author: Morten Welinder <terra gnome org>
Date: Wed Jun 19 11:38:59 2013 -0400
.gnumeric: fix crash with corrupted file.
NEWS | 2 +-
src/xml-sax-read.c | 17 ++++++++++-------
2 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/NEWS b/NEWS
index 351843c..3e7c60b 100644
--- a/NEWS
+++ b/NEWS
@@ -64,7 +64,7 @@ Morten:
* Fix xls/biff5 link export. [#701604]
* Workaround problems with automake 1.13.
* Fix crashes on corrupted files. [#702101] [#702182] [#702218]
- [#702267] [#702277] [#702379]
+ [#702267] [#702277] [#702379] [#702658]
--------------------------------------------------------------------------
Gnumeric 1.12.2
diff --git a/src/xml-sax-read.c b/src/xml-sax-read.c
index cd49ad9..fbf60ff 100644
--- a/src/xml-sax-read.c
+++ b/src/xml-sax-read.c
@@ -2692,13 +2692,16 @@ xml_sax_named_expr_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
NULL,
TRUE,
NULL);
-
- state->delayed_names = g_list_prepend (state->delayed_names, state->sheet);
- state->delayed_names = g_list_prepend (state->delayed_names, state->name.value);
- state->name.value = NULL;
- state->delayed_names = g_list_prepend (state->delayed_names, state->name.position);
- state->name.position = NULL;
- state->delayed_names = g_list_prepend (state->delayed_names, nexpr);
+ if (nexpr) {
+ state->delayed_names = g_list_prepend (state->delayed_names, state->sheet);
+ state->delayed_names = g_list_prepend (state->delayed_names, state->name.value);
+ state->name.value = NULL;
+ state->delayed_names = g_list_prepend (state->delayed_names, state->name.position);
+ state->name.position = NULL;
+ state->delayed_names = g_list_prepend (state->delayed_names, nexpr);
+ } else {
+ g_warning ("Strangeness with defined name");
+ }
}
g_free (state->name.name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]