[gnumeric] Fix crash on corrupted files. [#703215]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix crash on corrupted files. [#703215]
- Date: Thu, 27 Jun 2013 20:29:49 +0000 (UTC)
commit 0397efdd7da37c1d545cf9060d5d842ec53f4ea8
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Thu Jun 27 14:29:18 2013 -0600
Fix crash on corrupted files. [#703215]
2013-06-27 Andreas J. Guelzow <aguelzow pyrshep ca>
* xlsx-read-drawing.c (xlsx_axis_crosses_at): check for null
axis->info
(xlsx_axis_crosses): check for null axis->info
NEWS | 2 +-
plugins/excel/ChangeLog | 6 ++++++
plugins/excel/xlsx-read-drawing.c | 12 ++++++++----
3 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/NEWS b/NEWS
index 01a6f0f..4f56fff 100644
--- a/NEWS
+++ b/NEWS
@@ -6,7 +6,7 @@ Andreas:
* Improve xls import of Excel 2010 functions.
* Fix documentation of r.q*.
* Add Excel 2010's BETA.DIST.
- * Fix crash on corrupted files. [#703149]
+ * Fix crash on corrupted files. [#703149] [#703215]
Jean:
* Don't attempt to add a path item when there is no path objecte. [#703052]
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index c4e12a6..c0b7623 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,5 +1,11 @@
2013-06-27 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * xlsx-read-drawing.c (xlsx_axis_crosses_at): check for null
+ axis->info
+ (xlsx_axis_crosses): check for null axis->info
+
+2013-06-27 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* ms-formula-read.c (ms-formula-read.c): add another
synonym
diff --git a/plugins/excel/xlsx-read-drawing.c b/plugins/excel/xlsx-read-drawing.c
index b69824f..f68fe98 100644
--- a/plugins/excel/xlsx-read-drawing.c
+++ b/plugins/excel/xlsx-read-drawing.c
@@ -499,6 +499,8 @@ xlsx_axis_crosses_at (GsfXMLIn *xin, xmlChar const **attrs)
*/
XLSXReadState *state = (XLSXReadState *)xin->user_state;
+ g_return_if_fail (state->axis.info != NULL);
+
simple_float (xin, attrs, &state->axis.info->cross_value);
}
@@ -596,10 +598,12 @@ xlsx_axis_crosses (GsfXMLIn *xin, xmlChar const **attrs)
XLSXReadState *state = (XLSXReadState *)xin->user_state;
int cross = GOG_AXIS_CROSS;
- if (state->axis.info && simple_enum (xin, attrs, crosses, &cross))
- state->axis.info->cross = cross;
- if (cross == GOG_AXIS_CROSS)
- state->axis.info->cross_value = 0.;
+ if (state->axis.info) {
+ if (simple_enum (xin, attrs, crosses, &cross))
+ state->axis.info->cross = cross;
+ if (cross == GOG_AXIS_CROSS)
+ state->axis.info->cross_value = 0.;
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]