[libgsf] ole: fix property parsing problem.



commit 4c665a63eecb77baa6824206f321048a4ec85517
Author: Morten Welinder <terra gnome org>
Date:   Mon Apr 27 19:24:30 2015 -0400

    ole: fix property parsing problem.

 ChangeLog             |    5 +++++
 NEWS                  |    3 +++
 gsf/gsf-msole-utils.c |    2 +-
 3 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2da96e6..88d8c89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-27  Morten Welinder  <terra gnome org>
+
+       * gsf/gsf-msole-utils.c (msole_prop_read): Reduce size available
+       for property by 4 since that is taken by the typeid.
+
 2015-04-18  Morten Welinder  <terra gnome org>
 
        * gsf/gsf-libxml.c (gsf_xml_out_get_output): Doc fix.
diff --git a/NEWS b/NEWS
index b8956bb..49a221a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 libgsf 1.14.34
 
+Morten:
+       * Fix OLE2 property parsing problem.  [#748528]
+
 --------------------------------------------------------------------------
 libgsf 1.14.33
 
diff --git a/gsf/gsf-msole-utils.c b/gsf/gsf-msole-utils.c
index 0ff5b8c..ea0c620 100644
--- a/gsf/gsf-msole-utils.c
+++ b/gsf/gsf-msole-utils.c
@@ -1049,7 +1049,7 @@ msole_prop_read (GsfInput *in,
 
                name = g_strdup (msole_prop_id_to_gsf (section, props[i].id, &linked));
                d (g_print (" @ %x %x = ", (unsigned)props[i].offset, (unsigned)size););
-               val = msole_prop_parse (section, type, &data, data + size);
+               val = msole_prop_parse (section, type, &data, data + size - 4);
 
                if (NULL != name && NULL != val) {
                        if (linked) {


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