[gnumeric] Cell: fuzzed file fix.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Cell: fuzzed file fix.
- Date: Mon, 11 May 2015 18:27:39 +0000 (UTC)
commit 9ab86493d580014844c064d2cf4cdb3fcc0e2ebc
Author: Morten Welinder <terra gnome org>
Date: Mon May 11 14:27:13 2015 -0400
Cell: fuzzed file fix.
ChangeLog | 4 ++++
NEWS | 1 +
src/cell.c | 2 ++
src/ranges.c | 2 +-
4 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 898a4e0..243eb33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-05-11 Morten Welinder <terra gnome org>
+
+ * src/cell.c (gnm_cell_set_array): Improve preconditions.
+
2015-05-09 Morten Welinder <terra gnome org>
* src/mstyle.c (gnm_style_set_font_uline): Add sanity check.
diff --git a/NEWS b/NEWS
index 8e21c98..db79807 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,7 @@ Morten:
* Plug leaks.
* Fuzzed file fixes. [#748595] [#748597] [#749031] [#749030]
[#749069] [#748533] [#749118] [#749166] [#749181] [#749184]
+ [#749236]
* Make solver check linearity of model.
* Fix xls saving of marker style. [#749185]
diff --git a/src/cell.c b/src/cell.c
index 35dcf58..4051516 100644
--- a/src/cell.c
+++ b/src/cell.c
@@ -389,6 +389,8 @@ gnm_cell_set_array (Sheet *sheet,
{
g_return_val_if_fail (sheet != NULL, FALSE);
g_return_val_if_fail (range_is_sane (r), FALSE);
+ g_return_val_if_fail (r->end.row < gnm_sheet_get_max_rows (sheet), FALSE);
+ g_return_val_if_fail (r->end.col < gnm_sheet_get_max_cols (sheet), FALSE);
g_return_val_if_fail (texpr != NULL, FALSE);
if (sheet_range_splits_array (sheet, r, NULL, NULL, NULL))
diff --git a/src/ranges.c b/src/ranges.c
index d89eebc..c362fbc 100644
--- a/src/ranges.c
+++ b/src/ranges.c
@@ -596,7 +596,7 @@ range_is_full (GnmRange const *r, Sheet const *sheet, gboolean horiz)
* Clip the range to the area of the sheet with content.
* if the range reaches the edge
*
- * The idea here is that users may select a whole column or ow when they
+ * The idea here is that users may select a whole column or row when they
* really are only concerned with the extent of the sheet.
* On the otehr hand, if users select any smaller region they probably
* intend to selec tjust that.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]