[goffice] Fix crasher in box plots. [#720310]
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Fix crasher in box plots. [#720310]
- Date: Thu, 12 Dec 2013 13:32:26 +0000 (UTC)
commit 93080d5af89f22b90eda314675168fd9f824d4c0
Author: Jean Brefort <jean brefort normalesup org>
Date: Thu Dec 12 14:32:13 2013 +0100
Fix crasher in box plots. [#720310]
ChangeLog | 13 +++++++++----
NEWS | 1 +
plugins/plot_distrib/gog-boxplot.c | 6 +++---
3 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9ff71a9..4bb188b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-12-12 Jean Brefort <jean brefort normalesup org>
+
+
+ * plugins/plot_distrib/gog-boxplot.c
+ (gog_box_plot_axis_get_bounds): fix crasher [#720310],
+ (gog_box_plot_view_render): fix valgrind warning.
+
2013-12-07 Morten Welinder <terra gnome org>
* goffice/gtk/go-font-sel.c (update_preview_after_face_change)
@@ -18,10 +25,8 @@
2013-12-02 Jean Brefort <jean brefort normalesup org>
- reviewed by: <delete if not using a buddy>
-
- * INSTALL:
- * goffice/graph/gog-guru.ui:
+ * goffice/graph/gog-guru.ui:fix graph guru appearance when used with
+ gtk+-3.10. [#719681]
2013-11-28 Morten Welinder <terra gnome org>
diff --git a/NEWS b/NEWS
index 2944e00..e61c66d 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ goffice 0.10.10:
Jean
* Fix graph guru appearance when used with gtk+-3.10. [#719681]
+ * Fix crasher in box plots. [#720310]
Morten:
* Improve complex math, notably complex power.
diff --git a/plugins/plot_distrib/gog-boxplot.c b/plugins/plot_distrib/gog-boxplot.c
index 916373b..99b4a2e 100644
--- a/plugins/plot_distrib/gog-boxplot.c
+++ b/plugins/plot_distrib/gog-boxplot.c
@@ -323,7 +323,7 @@ gog_box_plot_axis_get_bounds (GogPlot *plot, GogAxisType axis,
GOData *s;
GogSeries *series;
GSList *ptr;
- int n = 0;
+ unsigned n = 0;
gboolean has_names = FALSE;
if (model->names)
for (ptr = model->base.series ; ptr != NULL ; ptr = ptr->next) {
@@ -332,7 +332,7 @@ gog_box_plot_axis_get_bounds (GogPlot *plot, GogAxisType axis,
!go_data_get_vector_size (series->values[0].data))
continue;
s = gog_series_get_name (series);
- if (s) {
+ if (s && n < model->num_series) {
model->names[n] = go_data_get_scalar_string (s);
has_names = TRUE;
}
@@ -515,7 +515,7 @@ gog_box_plot_view_render (GogView *view, GogViewAllocation const *bbox)
l2 = series->vals[1] - d * 3.;
m1 = series->vals[3] + d * 1.5;
m2 = series->vals[3] + d * 3.;
- while (series->svals[i] < l1) {
+ while (i < series->nb_valid && series->svals[i] < l1) {
/* display the outlier as a mark */
d = gog_axis_map_to_view (map, series->svals[i]);
if (model->vertical) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]