[gnumeric] Fix crash on corrupted files. [#705420]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix crash on corrupted files. [#705420]
- Date: Sun, 4 Aug 2013 17:35:24 +0000 (UTC)
commit e22b5ccac2ccb41f54b0aee94d64d65246b0dfe7
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Sun Aug 4 11:34:05 2013 -0600
Fix crash on corrupted files. [#705420]
2013-08-03 Andreas J. Guelzow <aguelzow pyrshep ca>
* openoffice-read.c (odf_parse_range_address_or_expr): initialize
GnmRangeRef
NEWS | 2 +-
plugins/openoffice/ChangeLog | 5 +++++
plugins/openoffice/openoffice-read.c | 7 +++++--
3 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/NEWS b/NEWS
index bbe3ed9..4f345c1 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +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] [#705385] [#705421]
+ * Fix crash on corrupted files. [#704636] [#705385] [#705421] [#705420]
* Fix ODF import of charts with series consisting of multiple ranges. [#704742]
* Fix ODF export of charts with series consisting of multiple ranges.
* Implement input message editing. [Part of #705310]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 84e6237..9580c43 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,5 +1,10 @@
2013-08-03 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * openoffice-read.c (odf_parse_range_address_or_expr): initialize
+ GnmRangeRef
+
+2013-08-03 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* openoffice-write.c (xl_find_conditional_format): There might
only be a single conditional part!
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 0e19c78..793b73a 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -2049,10 +2049,13 @@ odf_parse_range_address_or_expr (GsfXMLIn *xin, char const *str)
GnmExprTop const *texpr = NULL;
OOFormula f_type = odf_get_formula_type (xin, &str);
- if (f_type != FORMULA_NOT_SUPPORTED) {
+ if (str != NULL && strlen (str) > 0 && f_type != FORMULA_NOT_SUPPORTED) {
GnmParsePos pp;
GnmRangeRef ref;
- char const *ptr = oo_rangeref_parse
+ char const *ptr;
+ gnm_cellref_init (&ref.a, invalid_sheet, 0, 0, TRUE);
+ gnm_cellref_init (&ref.b, invalid_sheet, 0, 0, TRUE);
+ ptr = oo_rangeref_parse
(&ref, str,
parse_pos_init_sheet (&pp, state->pos.sheet),
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]