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



Author: mortenw
Date: Wed Jan 30 14:52:58 2008
New Revision: 16315
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16315&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:
   branches/gnumeric-1-8/NEWS
   branches/gnumeric-1-8/plugins/excel/ChangeLog
   branches/gnumeric-1-8/plugins/excel/ms-excel-read.c

Modified: branches/gnumeric-1-8/NEWS
==============================================================================
--- branches/gnumeric-1-8/NEWS	(original)
+++ branches/gnumeric-1-8/NEWS	Wed Jan 30 14:52:58 2008
@@ -3,7 +3,7 @@
 Morten:
 	* 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.1

Modified: branches/gnumeric-1-8/plugins/excel/ms-excel-read.c
==============================================================================
--- branches/gnumeric-1-8/plugins/excel/ms-excel-read.c	(original)
+++ branches/gnumeric-1-8/plugins/excel/ms-excel-read.c	Wed Jan 30 14:52:58 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]