[gnumeric] Fix crash on corrupted files. [#704636]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix crash on corrupted files. [#704636]
- Date: Sun, 21 Jul 2013 19:25:49 +0000 (UTC)
commit cd6132ee1a444e668106c65249d246bc34b30934
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Sun Jul 21 13:25:03 2013 -0600
Fix crash on corrupted files. [#704636]
2013-07-21 Andreas J. Guelzow <aguelzow pyrshep ca>
* xlsx-write-pivot.c (xlsx_write_pivot_val): check for NULL
value
(xlsx_write_pivot_cache_records): ditto
NEWS | 1 +
plugins/excel/ChangeLog | 6 ++++++
plugins/excel/xlsx-write-pivot.c | 12 +++++++-----
3 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/NEWS b/NEWS
index 71d6cd0..d8e7459 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ Andreas:
* Improve import to ODF of empty cells with default column styles. [#704563]
* Speed up loading of some ODF files. [#704422]
* Fix ODF style import. [#704563]
+ * Fix crash on corrupted files. [#704636]
Jean:
* Fix text wrap inside sheet objects. [#704417]
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index b913b0e..14c481d 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,9 @@
+2013-07-21 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * xlsx-write-pivot.c (xlsx_write_pivot_val): check for NULL
+ value
+ (xlsx_write_pivot_cache_records): ditto
+
2013-07-10 Morten Welinder <terra gnome org>
* Release 1.12.4
diff --git a/plugins/excel/xlsx-write-pivot.c b/plugins/excel/xlsx-write-pivot.c
index 7aed2da..a133df4 100644
--- a/plugins/excel/xlsx-write-pivot.c
+++ b/plugins/excel/xlsx-write-pivot.c
@@ -36,6 +36,7 @@ static void
xlsx_write_pivot_val (XLSXWriteState *state, GsfXMLOut *xml,
GOVal const *v)
{
+ g_return_if_fail (v != NULL);
switch (v->type) {
case VALUE_CELLRANGE:
case VALUE_ARRAY:
@@ -116,11 +117,12 @@ xlsx_write_pivot_cache_records (XLSXWriteState *state, GODataCache const *cache,
gsf_xml_out_end_element (xml);
break;
- case GO_DATA_CACHE_FIELD_TYPE_INLINE :
- xlsx_write_pivot_val (state, xml,
- go_data_cache_field_get_val (field, j));
- break;
-
+ case GO_DATA_CACHE_FIELD_TYPE_INLINE : {
+ GOVal const *v = go_data_cache_field_get_val (field, j);
+ if (v != NULL)
+ xlsx_write_pivot_val (state, xml, v);
+ break;
+ }
case GO_DATA_CACHE_FIELD_TYPE_NONE :
continue;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]