gnumeric r16400 - branches/gnumeric-1-8/plugins/excel
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16400 - branches/gnumeric-1-8/plugins/excel
- Date: Sun, 24 Feb 2008 00:49:17 +0000 (GMT)
Author: mortenw
Date: Sun Feb 24 00:49:16 2008
New Revision: 16400
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16400&view=rev
Log:
2008-02-23 Morten Welinder <terra gnome org>
* ms-excel-read.c (excel_externsheet_v8): Take guint16 argument to
prevent negative lookups.
Modified:
branches/gnumeric-1-8/plugins/excel/ChangeLog
branches/gnumeric-1-8/plugins/excel/ms-chart.c
branches/gnumeric-1-8/plugins/excel/ms-excel-read.c
branches/gnumeric-1-8/plugins/excel/ms-excel-read.h
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 Feb 24 00:49:16 2008
@@ -305,6 +305,8 @@
int top_state = BC_R(top_state) (s, 0);
+ XL_CHECK_CONDITION_VAL (q->length - 8 >= length, TRUE);
+
/* ignore these for now */
if (top_state == BIFF_CHART_text)
return FALSE;
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 Sun Feb 24 00:49:16 2008
@@ -5535,13 +5535,13 @@
* WARNING WARNING WARNING
**/
ExcelExternSheetV8 const *
-excel_externsheet_v8 (GnmXLImporter const *importer, gint16 i)
+excel_externsheet_v8 (GnmXLImporter const *importer, guint16 i)
{
d (2, fprintf (stderr, "externv8 %hd\n", i););
g_return_val_if_fail (importer->v8.externsheet != NULL, NULL);
- if (i >= (int)importer->v8.externsheet->len) {
+ if (i >= importer->v8.externsheet->len) {
g_warning ("%hd >= %u\n", i, importer->v8.externsheet->len);
return NULL;
}
Modified: branches/gnumeric-1-8/plugins/excel/ms-excel-read.h
==============================================================================
--- branches/gnumeric-1-8/plugins/excel/ms-excel-read.h (original)
+++ branches/gnumeric-1-8/plugins/excel/ms-excel-read.h Sun Feb 24 00:49:16 2008
@@ -127,7 +127,7 @@
GnmValue *biff_get_error (GnmEvalPos const *pos, guint8 const err);
Sheet *excel_externsheet_v7 (MSContainer const *container, gint16 i);
-ExcelExternSheetV8 const *excel_externsheet_v8 (GnmXLImporter const *wb, gint16 i);
+ExcelExternSheetV8 const *excel_externsheet_v8 (GnmXLImporter const *wb, guint16 i);
void excel_read_EXTERNSHEET_v7 (BiffQuery const *q, MSContainer *container);
MsBiffBofData *ms_biff_bof_data_new (BiffQuery * q);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]