gnumeric r17230 - trunk/plugins/excel
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r17230 - trunk/plugins/excel
- Date: Fri, 20 Mar 2009 18:27:34 +0000 (UTC)
Author: mortenw
Date: Fri Mar 20 18:27:34 2009
New Revision: 17230
URL: http://svn.gnome.org/viewvc/gnumeric?rev=17230&view=rev
Log:
2009-03-20 Morten Welinder <terra gnome org>
* ms-excel-read.c (excel_read_LABEL_markup): Fix sanity check
off-by-one.
* ms-container.c (ms_container_read_markup): Fix termination
condition. #576112.
(ms_container_read_markup): Fix sanity check off-by-one.
Modified:
trunk/plugins/excel/ChangeLog
trunk/plugins/excel/ms-container.c
trunk/plugins/excel/ms-excel-read.c
Modified: trunk/plugins/excel/ms-container.c
==============================================================================
--- trunk/plugins/excel/ms-container.c (original)
+++ trunk/plugins/excel/ms-container.c Fri Mar 20 18:27:34 2009
@@ -268,10 +268,10 @@
txo_run.last = G_MAXINT;
txo_run.accum = pango_attr_list_new ();
- for (txo_len -= 16 ; txo_len >= 0 ; txo_len -= 8) {
+ for (txo_len -= 16 ; (gssize)txo_len >= 0 ; txo_len -= 8) {
guint16 o = GSF_LE_GET_GUINT16 (data + txo_len);
guint16 l = GSF_LE_GET_GUINT16 (data + txo_len + 2);
- XL_CHECK_CONDITION_VAL (o + l < str_len,
+ XL_CHECK_CONDITION_VAL (o + l <= str_len,
(pango_attr_list_unref (txo_run.accum),
NULL));
Modified: trunk/plugins/excel/ms-excel-read.c
==============================================================================
--- trunk/plugins/excel/ms-excel-read.c (original)
+++ trunk/plugins/excel/ms-excel-read.c Fri Mar 20 18:27:34 2009
@@ -1090,7 +1090,7 @@
o = GSF_LE_GET_GUINT16 (ptr + n);
l = GSF_LE_GET_GUINT16 (ptr + n + 2);
- XL_CHECK_CONDITION_VAL (o + l < str_len,
+ XL_CHECK_CONDITION_VAL (o + l <= str_len,
(pango_attr_list_unref (txo_run.accum),
NULL));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]