[gnumeric] PERIODOGRAM: fix crash.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnumeric] PERIODOGRAM: fix crash.
- Date: Thu, 18 Jun 2009 09:31:24 -0400 (EDT)
commit 5bda4f057e15a79e286fee7accc8b21ea4632bab
Author: Morten Welinder <terra gnome org>
Date: Thu Jun 18 09:31:07 2009 -0400
PERIODOGRAM: fix crash.
NEWS | 1 +
plugins/fn-tsa/ChangeLog | 4 ++++
plugins/fn-tsa/functions.c | 2 +-
3 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 3bd9f45..37cf94c 100644
--- a/NEWS
+++ b/NEWS
@@ -47,6 +47,7 @@ Morten:
* Fixed FIXED. No, really.
* Start introducing external references for function docs.
* Implement new functions COTH and ACOTH. [#586170]
+ * Fix tsa crash. [#586191]
--------------------------------------------------------------------------
Gnumeric 1.9.8
diff --git a/plugins/fn-tsa/ChangeLog b/plugins/fn-tsa/ChangeLog
index cd10283..809343e 100644
--- a/plugins/fn-tsa/ChangeLog
+++ b/plugins/fn-tsa/ChangeLog
@@ -1,3 +1,7 @@
+2009-06-18 Morten Welinder <terra gnome org>
+
+ * functions.c (gnumeric_periodogram): Fix crash. #586191.
+
2009-06-05 Andreas J. Guelzow <aguelzow pyrshep ca>
* functions.c (gnm_fourier_fft): moved here from
diff --git a/plugins/fn-tsa/functions.c b/plugins/fn-tsa/functions.c
index b3028c0..2a94c96 100644
--- a/plugins/fn-tsa/functions.c
+++ b/plugins/fn-tsa/functions.c
@@ -889,7 +889,7 @@ gnumeric_periodogram (GnmFuncEvalInfo *ei, GnmValue const * const *argv)
gnm_fourier_fft (in, nb, 1, &out, FALSE);
g_free (in);
nb /= 2;
- if (out) {
+ if (out && nb > 0) {
res = value_new_array_non_init (1 , nb);
res->v_array.vals[0] = g_new (GnmValue *, nb);
for (i = 0; i < nb; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]