gnumeric r16276 - in trunk: . plugins/fn-database src src/tools
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16276 - in trunk: . plugins/fn-database src src/tools
- Date: Wed, 16 Jan 2008 02:21:56 +0000 (GMT)
Author: mortenw
Date: Wed Jan 16 02:21:56 2008
New Revision: 16276
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16276&view=rev
Log:
2008-01-15 Morten Welinder <terra gnome org>
* src/value.c (parse_database_criteria): Verify that we have a
cellrange which is the only cases handled. Part of fix for
509427.
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/plugins/fn-database/ChangeLog
trunk/plugins/fn-database/functions.c
trunk/src/tools/ChangeLog
trunk/src/tools/filter.c
trunk/src/value.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Jan 16 02:21:56 2008
@@ -3,6 +3,7 @@
Morten:
* Fix NPV doc problem. [#506160]
* Fix python compilation problem. [#509023] [508988]
+ * Fix DSUM crash. [#509427]
--------------------------------------------------------------------------
Gnumeric 1.8.0
Modified: trunk/plugins/fn-database/functions.c
==============================================================================
--- trunk/plugins/fn-database/functions.c (original)
+++ trunk/plugins/fn-database/functions.c Wed Jan 16 02:21:56 2008
@@ -174,6 +174,10 @@
if (fieldno < 0)
return value_new_error_NUM (ei->pos);
+ /* I don't like this -- minimal fix for now. 509427. */
+ if (criteria->type != VALUE_CELLRANGE)
+ return value_new_error_NUM (ei->pos);
+
criterias = parse_database_criteria (ei->pos, database, criteria);
if (criterias == NULL)
return value_new_error_NUM (ei->pos);
@@ -232,6 +236,10 @@
if (fieldno < 0)
return value_new_error_NUM (ei->pos);
+ /* I don't like this -- minimal fix for now. 509427. */
+ if (criteria->type != VALUE_CELLRANGE)
+ return value_new_error_NUM (ei->pos);
+
criterias = parse_database_criteria (ei->pos, database, criteria);
if (criterias == NULL)
return value_new_error_NUM (ei->pos);
Modified: trunk/src/tools/filter.c
==============================================================================
--- trunk/src/tools/filter.c (original)
+++ trunk/src/tools/filter.c Wed Jan 16 02:21:56 2008
@@ -114,6 +114,10 @@
GSList *crit, *rows;
GnmEvalPos ep;
+ /* I don't like this -- minimal fix for now. 509427. */
+ if (criteria->type != VALUE_CELLRANGE)
+ return ERR_INVALID_FIELD;
+
crit = parse_database_criteria (
eval_pos_init_sheet (&ep, wb_control_cur_sheet (wbc)),
database, criteria);
Modified: trunk/src/value.c
==============================================================================
--- trunk/src/value.c (original)
+++ trunk/src/value.c Wed Jan 16 02:21:56 2008
@@ -1596,6 +1596,8 @@
int b_col, b_row, e_col, e_row;
int *field_ind;
+ g_return_val_if_fail (criteria->type == VALUE_CELLRANGE, NULL);
+
sheet = eval_sheet (criteria->v_range.cell.a.sheet, ep->sheet);
b_col = criteria->v_range.cell.a.col;
b_row = criteria->v_range.cell.a.row;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]