[gnumeric] Fix INTERPOLATION crash. [#680711]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix INTERPOLATION crash. [#680711]
- Date: Fri, 27 Jul 2012 18:11:07 +0000 (UTC)
commit fb3475d93a02bf98516e04d0e04e6fed97296428
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Fri Jul 27 12:10:28 2012 -0600
Fix INTERPOLATION crash. [#680711]
2012-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
* functions.c (gnumeric_interpolation): check for target size
after adjustment
NEWS | 1 +
plugins/fn-tsa/ChangeLog | 5 +++++
plugins/fn-tsa/functions.c | 12 ++++++------
3 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/NEWS b/NEWS
index 209e8a2..af2a9dd 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Andreas:
* Fix implicit ')' for array functions. [#680548]
* Add FLIP function. [#680511]
* Allow unordered abscissae in INTERPOLATION. [#680510]
+ * Fix INTERPOLATION crash. [#680711]
Jean:
* Fix component references issues. [#680190]
diff --git a/plugins/fn-tsa/ChangeLog b/plugins/fn-tsa/ChangeLog
index aa37b37..932f6e7 100644
--- a/plugins/fn-tsa/ChangeLog
+++ b/plugins/fn-tsa/ChangeLog
@@ -1,5 +1,10 @@
2012-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * functions.c (gnumeric_interpolation): check for target size
+ after adjustment
+
+2012-07-27 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* functions.c (gnumeric_interpolation): sort abscissae
if they are unordered
(help_interpolation): delete the requirement that abscissae
diff --git a/plugins/fn-tsa/functions.c b/plugins/fn-tsa/functions.c
index bfd78ba..5ba4947 100644
--- a/plugins/fn-tsa/functions.c
+++ b/plugins/fn-tsa/functions.c
@@ -432,12 +432,6 @@ gnumeric_interpolation (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
return error;
}
- if (n2 <= 0) {
- g_slist_free (missing2);
- g_free (vals2);
- return value_new_error_std (ei->pos, GNM_ERROR_VALUE);
- }
-
/* argv[3] */
if (argv[3]) {
@@ -474,6 +468,12 @@ gnumeric_interpolation (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
break;
}
+ if (n2 <= 0) {
+ g_slist_free (missing2);
+ g_free (vals2);
+ return value_new_error_std (ei->pos, GNM_ERROR_VALUE);
+ }
+
/* argv[0] & argv[1] */
flags = COLLECT_IGNORE_BLANKS | COLLECT_IGNORE_STRINGS | COLLECT_IGNORE_BOOLS;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]