gnumeric r16682 - in branches/gnumeric-1-8: . plugins/excel



Author: mortenw
Date: Sun Jun 29 13:12:17 2008
New Revision: 16682
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16682&view=rev

Log:
2008-06-29  Morten Welinder  <terra gnome org>

	* ms-chart.c (xl_chart_import_error_bar): More checks on parent.
	Fixes #540697.



Modified:
   branches/gnumeric-1-8/NEWS
   branches/gnumeric-1-8/plugins/excel/ChangeLog
   branches/gnumeric-1-8/plugins/excel/ms-chart.c

Modified: branches/gnumeric-1-8/NEWS
==============================================================================
--- branches/gnumeric-1-8/NEWS	(original)
+++ branches/gnumeric-1-8/NEWS	Sun Jun 29 13:12:17 2008
@@ -4,6 +4,7 @@
 	* Fix ODS import failure on win32. [#536552]
 
 Morten:
+	* Fix bogus-xls problem.  [#540697]
 	* Fix EOMONTH issue.  [#540069]
 	* Fix phyper hang.  [#540211]
 	* Fix text export problem for times with fractional seconds.  [#534514]

Modified: branches/gnumeric-1-8/plugins/excel/ms-chart.c
==============================================================================
--- branches/gnumeric-1-8/plugins/excel/ms-chart.c	(original)
+++ branches/gnumeric-1-8/plugins/excel/ms-chart.c	Sun Jun 29 13:12:17 2008
@@ -3226,7 +3226,8 @@
 static void
 xl_chart_import_error_bar (XLChartReadState *state, XLChartSeries *series)
 {
-	XLChartSeries *parent = g_ptr_array_index (state->series, series->err_parent);
+	unsigned p = series->err_parent;
+	XLChartSeries *parent;
 	Sheet *sheet;
 	int orig_dim;
 	GogMSDimType msdim;
@@ -3234,6 +3235,9 @@
 		? "x-errors" : "y-errors";
 	GParamSpec *pspec;
 
+	XL_CHECK_CONDITION (p < state->series->len);
+
+	parent = g_ptr_array_index (state->series, p);
 	XL_CHECK_CONDITION (parent != NULL && parent->series != NULL);
 
 	pspec = g_object_class_find_property (



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]