[gnumeric] xlsx: fix eom on broken file.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xlsx: fix eom on broken file.
- Date: Sun, 16 Jun 2013 13:28:16 +0000 (UTC)
commit c10b853af226e54d7209435428aed5a3d9dcaf48
Author: Morten Welinder <terra gnome org>
Date: Sun Jun 16 09:27:48 2013 -0400
xlsx: fix eom on broken file.
NEWS | 2 +-
plugins/excel/ChangeLog | 5 +++++
plugins/excel/xlsx-read-drawing.c | 8 ++++++--
3 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/NEWS b/NEWS
index 3de59e5..5a4aaa1 100644
--- a/NEWS
+++ b/NEWS
@@ -60,7 +60,7 @@ Morten:
* Fix xls/biff5 link export. [#701604]
* Workaround problems with automake 1.13.
* Fix crashes on corrupted files. [#702101] [#702182] [#702218]
- [#702267] [#702277]
+ [#702267] [#702277] [#702379]
--------------------------------------------------------------------------
Gnumeric 1.12.2
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 8e7c78c..13e86d1 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-16 Morten Welinder <terra gnome org>
+
+ * xlsx-read-drawing.c (xlsx_blip_start): Handle errors in getting
+ blip. Fixes #702379.
+
2013-06-15 Andreas J. Guelzow <aguelzow pyrshep ca>
* xlsx-read.c (xlsx_read_chart): there may not be any plots in a chart.
diff --git a/plugins/excel/xlsx-read-drawing.c b/plugins/excel/xlsx-read-drawing.c
index 4cef4d2..2d7719c 100644
--- a/plugins/excel/xlsx-read-drawing.c
+++ b/plugins/excel/xlsx-read-drawing.c
@@ -2195,8 +2195,12 @@ xlsx_blip_start (GsfXMLIn *xin, xmlChar const **attrs)
gsf_xml_in_get_input (xin), attrs[1]);
GsfInput *input = gsf_open_pkg_open_rel (
gsf_xml_in_get_input (xin), rel, NULL);
- size_t size = gsf_input_size (input);
- guint8 *data = g_new (guint8, size);
+ size_t size;
+ guint8 *data;
+
+ g_return_if_fail (input != NULL);
+ size = gsf_input_size (input);
+ data = g_new (guint8, size);
gsf_input_read (input, size, data);
sheet_object_image_set_image (SHEET_OBJECT_IMAGE (state->so),
NULL, data, size, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]