[goffice] Fix crash in exponential smoothing with invalid y data. [#377]
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Fix crash in exponential smoothing with invalid y data. [#377]
- Date: Tue, 15 Jan 2019 08:33:56 +0000 (UTC)
commit 428936189ef5367313a582462508125efb58be15
Author: Jean Brefort <jean brefort normalesup org>
Date: Tue Jan 15 09:33:24 2019 +0100
Fix crash in exponential smoothing with invalid y data. [#377]
ChangeLog | 5 +++++
NEWS | 3 +++
plugins/smoothing/gog-exp-smooth.c | 2 +-
3 files changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/ChangeLog b/ChangeLog
index 51889d00..ad8b4a1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-01-15 Jean Brefort <jean brefort normalesup org>
+
+ * plugins/smoothing/gog-exp-smooth.c (gog_exp_smooth_update): protect
+ against NULL y values. [#377]
+
2018-11-24 Morten Welinder <terra gnome org>
* goffice/math/go-quad.c: Introspection fixes.
diff --git a/NEWS b/NEWS
index 32ab2a89..3cfea871 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
goffice 0.10.45:
+Jean:
+ * Fix crash in exponential smoothing with invalid y data. [#377]
+
Morten:
* Introspection fixes.
* Work around gtk-doc bugs.
diff --git a/plugins/smoothing/gog-exp-smooth.c b/plugins/smoothing/gog-exp-smooth.c
index 06ce52f9..1522009c 100644
--- a/plugins/smoothing/gog-exp-smooth.c
+++ b/plugins/smoothing/gog-exp-smooth.c
@@ -103,7 +103,7 @@ gog_exp_smooth_update (GogObject *obj)
return;
nb = gog_series_get_xy_data (series, &x_vals, &y_vals);
- if (nb == 0)
+ if (nb == 0 || y_vals == NULL)
return;
x = g_new (double, nb);
y = g_new (double, nb);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]