goffice r2229 - in trunk: . plugins/plot_distrib
- From: jbrefort svn gnome org
- To: svn-commits-list gnome org
- Subject: goffice r2229 - in trunk: . plugins/plot_distrib
- Date: Mon, 6 Oct 2008 06:02:46 +0000 (UTC)
Author: jbrefort
Date: Mon Oct 6 06:02:46 2008
New Revision: 2229
URL: http://svn.gnome.org/viewvc/goffice?rev=2229&view=rev
Log:
2008-10-06 Jean Brefort <jean brefort normalesup org>
* plugins/plot_distrib/gog-probability-plot.c:
(gog_probability_plot_series_update): don't write a second in
an array of size 1. [#555161]
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/plugins/plot_distrib/gog-probability-plot.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon Oct 6 06:02:46 2008
@@ -6,6 +6,7 @@
Jean:
* Implement probability plots for some common distributions. [#500168]
+ * Fix invalid write in gog_probability_plot_series_update. [#555161]
Morten:
* Fix go_url_resolve_relative. [#550898]
Modified: trunk/plugins/plot_distrib/gog-probability-plot.c
==============================================================================
--- trunk/plugins/plot_distrib/gog-probability-plot.c (original)
+++ trunk/plugins/plot_distrib/gog-probability-plot.c Mon Oct 6 06:02:46 2008
@@ -433,9 +433,12 @@
if (series->base.num_elements > 0) {
series->y = g_new0 (double, series->base.num_elements);
series->y[0] = go_distribution_get_ppf (dist, 1. - mn);
- for (i = 1; i < series->base.num_elements - 1; i++)
- series->y[i] = go_distribution_get_ppf (dist, (i + .6825) / d);
- series->y[i] = go_distribution_get_ppf (dist, mn);
+ if (series->base.num_elements > 1) {
+ for (i = 1; i < series->base.num_elements - 1; i++)
+ series->y[i] = go_distribution_get_ppf (dist, (i + .6825) / d);
+ series->y[i] = go_distribution_get_ppf (dist, mn);
+ }
+
} else
series->y = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]