[gnumeric] xlsx: another leak for fuzzed files.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xlsx: another leak for fuzzed files.
- Date: Fri, 8 May 2015 17:18:50 +0000 (UTC)
commit f19b24bbd1e9de5b3a1bcbe9ff5b7600370e6606
Author: Morten Welinder <terra gnome org>
Date: Fri May 8 13:18:30 2015 -0400
xlsx: another leak for fuzzed files.
plugins/excel/xlsx-read.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/plugins/excel/xlsx-read.c b/plugins/excel/xlsx-read.c
index 2434fbe..d5da833 100644
--- a/plugins/excel/xlsx-read.c
+++ b/plugins/excel/xlsx-read.c
@@ -4120,6 +4120,16 @@ xlsx_collection_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
}
static void
+xlsx_col_elem_begin (GsfXMLIn *xin, G_GNUC_UNUSED xmlChar const **attrs)
+{
+ XLSXReadState *state = (XLSXReadState *)xin->user_state;
+ if (!state->style_accum_partial) {
+ g_return_if_fail (NULL == state->style_accum);
+ state->style_accum = gnm_style_new ();
+ }
+}
+
+static void
xlsx_col_elem_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
{
XLSXReadState *state = (XLSXReadState *)xin->user_state;
@@ -4139,16 +4149,6 @@ xlsx_col_elem_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
}
static void
-xlsx_col_elem_begin (GsfXMLIn *xin, G_GNUC_UNUSED xmlChar const **attrs)
-{
- XLSXReadState *state = (XLSXReadState *)xin->user_state;
- if (!state->style_accum_partial) {
- g_return_if_fail (NULL == state->style_accum);
- state->style_accum = gnm_style_new ();
- }
-}
-
-static void
xlsx_col_border_begin (GsfXMLIn *xin, xmlChar const **attrs)
{
XLSXReadState *state = (XLSXReadState *)xin->user_state;
@@ -5085,6 +5085,7 @@ xlsx_file_open (G_GNUC_UNUSED GOFileOpener const *fo, GOIOContext *context,
if (state.comment) g_object_unref (state.comment);
if (state.cur_style) g_object_unref (state.cur_style);
if (state.style_accum) gnm_style_unref (state.style_accum);
+ if (state.pending_rowcol_style) gnm_style_unref (state.pending_rowcol_style);
if (state.border_color) style_color_unref (state.border_color);
workbook_set_saveinfo (state.wb, GO_FILE_FL_AUTO,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]