[gnumeric] xls: don't check len for listbox data. Field has different	meaning.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnumeric] xls: don't check len for listbox data. Field has different	meaning.
- Date: Tue,  5 Jan 2016 13:45:26 +0000 (UTC)
commit a312c709acb36ccd38b2f5a011bbafca210790df
Author: Morten Welinder <terra gnome org>
Date:   Tue Jan 5 08:44:17 2016 -0500
    xls: don't check len for listbox data.  Field has different meaning.
    
    This is now documented and related to continue records.
 plugins/excel/ms-obj.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/excel/ms-obj.c b/plugins/excel/ms-obj.c
index c27b36a..79859fd 100644
--- a/plugins/excel/ms-obj.c
+++ b/plugins/excel/ms-obj.c
@@ -995,7 +995,10 @@ ms_obj_read_biff8_obj (BiffQuery *q, MSContainer *c, MSObj *obj)
                 */
                guint16 len = GSF_LE_GET_GUINT16(data+2);
 
-               XL_CHECK_CONDITION_VAL (data_len_left >= 4 + len, TRUE);
+               // The would-be "len" field has different meaning for
+               // GR_LISTBOX_DATA.
+               if (record_type != GR_LISTBOX_DATA)
+                       XL_CHECK_CONDITION_VAL (data_len_left >= 4 + len, TRUE);
 
                /* 1st record must be COMMON_OBJ*/
                XL_CHECK_CONDITION_VAL (obj->excel_type >= 0 ||
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]