[gnumeric] Fix crash on corrupted files. [#703895]



commit 93673324a9b573c37f0f254fdc423e9670979742
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Tue Jul 9 13:53:36 2013 -0600

    Fix crash on corrupted files. [#703895]
    
    2013-07-09  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * ms-excel-read.c (excel_read_HLINK): check for NULL data

 NEWS                          |    2 +-
 plugins/excel/ChangeLog       |    4 ++++
 plugins/excel/ms-excel-read.c |    3 ++-
 3 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index 35761d9..b157414 100644
--- a/NEWS
+++ b/NEWS
@@ -6,7 +6,7 @@ Andreas:
        * Improve xls import of Excel 2010 functions.
        * Fix documentation of r.q* and r.*nbinom. [#703164]
        * Add Excel 2010's BETA.DIST.
-       * Fix crash on corrupted files. [#703149] [#703215] [#703625]
+       * Fix crash on corrupted files. [#703149] [#703215] [#703625] [#703895]
        * Fix import of sxc files. [#703249]
        * Fix TDIST Import/Export from/to ODF.
        * Write manual legend position to ODF. [#703362]
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 0f441ae..c9b7349 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,7 @@
+2013-07-09  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * ms-excel-read.c (excel_read_HLINK): check for NULL data
+
 2013-07-09  Morten Welinder  <terra gnome org>
 
        * ms-formula-read.c (getRefV8): Take GnmSheetSize argument.
diff --git a/plugins/excel/ms-excel-read.c b/plugins/excel/ms-excel-read.c
index f78bcd6..ab8c4f0 100644
--- a/plugins/excel/ms-excel-read.c
+++ b/plugins/excel/ms-excel-read.c
@@ -5828,7 +5828,8 @@ excel_read_HLINK (BiffQuery *q, ExcelReadSheet *esheet)
            next_opcode == BIFF_LINK_TIP) {
                ms_biff_query_next (q);
                /* according to OO the bytes 2..10 are the range for the tip */
-               tip = read_utf16_str ((q->length - 10)/ 2, q->data + 10);
+               if (q->data != NULL)
+                       tip = read_utf16_str ((q->length - 10)/ 2, q->data + 10);
        }
 
        if (link != NULL) {


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