[gnumeric] xls: fuzzed file fix.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xls: fuzzed file fix.
- Date: Mon, 4 Jan 2016 01:21:54 +0000 (UTC)
commit 0cf31bcf9644302484b7ddbc224870607d061ffb
Author: Morten Welinder <terra gnome org>
Date: Sun Jan 3 20:21:45 2016 -0500
xls: fuzzed file fix.
ChangeLog | 5 +++++
NEWS | 2 +-
src/sheet-style.c | 14 ++++++++++++--
3 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 745fcac..9592aa6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-03 Morten Welinder <terra gnome org>
+
+ * src/sheet-style.c (sheet_style_apply_range)
+ (sheet_style_set_range): Ensure sanity of range. Fixes #760102.
+
2016-01-02 Morten Welinder <terra gnome org>
* src/mathfunc.c (expmx2h): Explicitly handle nan, just in case.
diff --git a/NEWS b/NEWS
index 75cf7a4..bfa3f6a 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Morten:
* Teach ssconvert to split sheets into separate .txt files [#694408]
* Improve test suite.
* Fuzzed file fixes. [#760046] [#760085] [#760087] [#760089]
- [#760043] [#760103]
+ [#760043] [#760103] [#760102]
--------------------------------------------------------------------------
Gnumeric 1.12.26
diff --git a/src/sheet-style.c b/src/sheet-style.c
index f46e20c..96efa5f 100644
--- a/src/sheet-style.c
+++ b/src/sheet-style.c
@@ -1375,14 +1375,19 @@ sheet_style_set_range (Sheet *sheet, GnmRange const *range,
GnmStyle *style)
{
ReplacementStyle rs;
+ GnmRange r;
g_return_if_fail (IS_SHEET (sheet));
g_return_if_fail (range != NULL);
+ g_return_if_fail (range_is_sane (range));
+
+ r = *range;
+ range_ensure_sanity (&r, sheet);
rstyle_ctor_style (&rs, style, sheet);
cell_tile_apply (&sheet->style_data->styles,
sheet->tile_top_level, 0, 0,
- range, &rs);
+ &r, &rs);
rstyle_dtor (&rs);
}
@@ -1761,14 +1766,19 @@ void
sheet_style_apply_range (Sheet *sheet, GnmRange const *range, GnmStyle *pstyle)
{
ReplacementStyle rs;
+ GnmRange r;
g_return_if_fail (IS_SHEET (sheet));
g_return_if_fail (range != NULL);
+ g_return_if_fail (range_is_sane (range));
+
+ r = *range;
+ range_ensure_sanity (&r, sheet);
rstyle_ctor_pstyle (&rs, pstyle, sheet);
cell_tile_apply (&sheet->style_data->styles,
sheet->tile_top_level, 0, 0,
- range, &rs);
+ &r, &rs);
rstyle_dtor (&rs);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]