gnumeric r16277 - in branches/gnumeric-1-8: . plugins/fn-database src src/tools
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16277 - in branches/gnumeric-1-8: . plugins/fn-database src src/tools
- Date: Wed, 16 Jan 2008 02:22:54 +0000 (GMT)
Author: mortenw
Date: Wed Jan 16 02:22:53 2008
New Revision: 16277
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16277&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:
branches/gnumeric-1-8/ChangeLog
branches/gnumeric-1-8/NEWS
branches/gnumeric-1-8/plugins/fn-database/ChangeLog
branches/gnumeric-1-8/plugins/fn-database/functions.c
branches/gnumeric-1-8/src/tools/ChangeLog
branches/gnumeric-1-8/src/tools/filter.c
branches/gnumeric-1-8/src/value.c
Modified: branches/gnumeric-1-8/NEWS
==============================================================================
--- branches/gnumeric-1-8/NEWS (original)
+++ branches/gnumeric-1-8/NEWS Wed Jan 16 02:22:53 2008
@@ -4,6 +4,7 @@
Morten:
* Fix NPV doc problem. [#506160]
* Fix python compilation problem. [#509023] [508988]
+ * Fix DSUM crash. [#509427]
--------------------------------------------------------------------------
Gnumeric 1.8.0
Modified: branches/gnumeric-1-8/plugins/fn-database/functions.c
==============================================================================
--- branches/gnumeric-1-8/plugins/fn-database/functions.c (original)
+++ branches/gnumeric-1-8/plugins/fn-database/functions.c Wed Jan 16 02:22:53 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: branches/gnumeric-1-8/src/tools/filter.c
==============================================================================
--- branches/gnumeric-1-8/src/tools/filter.c (original)
+++ branches/gnumeric-1-8/src/tools/filter.c Wed Jan 16 02:22:53 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: branches/gnumeric-1-8/src/value.c
==============================================================================
--- branches/gnumeric-1-8/src/value.c (original)
+++ branches/gnumeric-1-8/src/value.c Wed Jan 16 02:22:53 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]