[gnumeric] xls: fix reading header/footer.



commit 56b082c434949260677c167731ad7ac42030ed55
Author: Morten Welinder <terra gnome org>
Date:   Mon May 11 21:29:25 2015 -0400

    xls: fix reading header/footer.

 NEWS                          |    2 +-
 plugins/excel/ChangeLog       |    5 ++++-
 plugins/excel/ms-excel-util.c |    2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/NEWS b/NEWS
index 3daeb7c..dad3b93 100644
--- a/NEWS
+++ b/NEWS
@@ -16,7 +16,7 @@ Morten:
        * Plug leaks.
        * Fuzzed file fixes.  [#748595] [#748597] [#749031] [#749030]
          [#749069] [#748533] [#749118] [#749166] [#749181] [#749184]
-         [#749236] [#749240] [#749234]
+         [#749236] [#749240] [#749234] [#749235]
        * Make solver check linearity of model.
        * Fix xls saving of marker style.  [#749185]
 
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index d0edf4a..29fe5c5 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,7 +1,10 @@
 2015-05-11  Morten Welinder  <terra gnome org>
 
+       * ms-excel-util.c (xls_header_footer_import): Handle terminating
+       "&".  Fixes #749235.
+
        * xls-read-pivot.c (xls_read_pivot_cache_values): Set the right
-       size on error.
+       size on error.  Fixes #749234.
 
 2015-05-10  Morten Welinder  <terra gnome org>
 
diff --git a/plugins/excel/ms-excel-util.c b/plugins/excel/ms-excel-util.c
index 5da6395..e1b31a1 100644
--- a/plugins/excel/ms-excel-util.c
+++ b/plugins/excel/ms-excel-util.c
@@ -765,7 +765,7 @@ xls_header_footer_import (GnmPrintHF *hf, const char *txt)
        accum = g_string_new (NULL);
        while (1) {
                if (txt[0] == 0 ||
-                   (txt[0] == '&' && strchr ("LCR", txt[1]))) {
+                   (txt[0] == '&' && txt[1] && strchr ("LCR", txt[1]))) {
                        char **sp;
                        switch (section) {
                        case 'L': sp = &hf->left_format; break;


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