gnumeric r16314 - in trunk: . plugins/excel



Author: mortenw
Date: Wed Jan 30 14:52:20 2008
New Revision: 16314
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16314&view=rev

Log:
2008-01-30  Morten Welinder  <terra gnome org>

	* ms-excel-read.c (excel_read_EXTERNNAME): Fix the error case.
	Fixes #513005.



Modified:
   trunk/NEWS
   trunk/plugins/excel/ChangeLog
   trunk/plugins/excel/ms-excel-read.c

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Wed Jan 30 14:52:20 2008
@@ -16,7 +16,7 @@
 	* Fix inter-sheet cut problem.  [#511706]
 	* Fix loading of solver constraints.
 	* Fix solver issue.  [#512500]
-	* Fix corrupted-xls-file problem.  [#512984]
+	* Fix corrupted-xls-file problems.  [#512984] [#513005]
 
 --------------------------------------------------------------------------
 Gnumeric 1.8.0

Modified: trunk/plugins/excel/ms-excel-read.c
==============================================================================
--- trunk/plugins/excel/ms-excel-read.c	(original)
+++ trunk/plugins/excel/ms-excel-read.c	Wed Jan 30 14:52:20 2008
@@ -3170,10 +3170,11 @@
 				unsigned expr_len = 0;
 				guint8 const *expr_data = NULL;
 				if (7 + 2 + namelen <= q->length) {
-					expr_len = GSF_LE_GET_GUINT16 (q->data + 7 + namelen);
-					if (7 + 2 + namelen + expr_len <= q->length)
+					unsigned el = GSF_LE_GET_GUINT16 (q->data + 7 + namelen);
+					if (7 + 2 + namelen + el <= q->length) {
+						expr_len = el;
 						expr_data = q->data + 9 + namelen;
-					else
+					} else
 						gnm_io_warning (container->importer->context,
 							_("Incorrect expression for name '%s': content will be lost.\n"),
 							name);



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