[libgsf] Resolves: rhbz#650874 / gnome#634435 crash parsing ancient .ppt

Caolan McNamara caolanm at fedoraproject.org
Tue Nov 9 16:42:44 UTC 2010


commit fc966d5e0fff20b42e6d8b5d8b682f3c20a623a8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Nov 9 16:42:37 2010 +0000

    Resolves: rhbz#650874 / gnome#634435 crash parsing ancient .ppt

 libgsf.gnome634435.avoidcrash.patch |   20 ++++++++++++++++++++
 libgsf.spec                         |    7 ++++++-
 2 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/libgsf.gnome634435.avoidcrash.patch b/libgsf.gnome634435.avoidcrash.patch
new file mode 100644
index 0000000..14c6aa2
--- /dev/null
+++ b/libgsf.gnome634435.avoidcrash.patch
@@ -0,0 +1,20 @@
+diff -ru libgsf-1.14.19/gsf/gsf-msole-utils.c libgsf-1.14.19.foo/gsf/gsf-msole-utils.c
+--- libgsf-1.14.19/gsf/gsf-msole-utils.c	2010-08-29 01:23:25.000000000 +0100
++++ libgsf-1.14.19.foo/gsf/gsf-msole-utils.c	2010-11-09 16:31:16.000000000 +0000
+@@ -894,8 +894,13 @@
+ 		error = NULL;
+ 		if (!parse_vt_cf (res, data, data_end, &error)) {
+ 			/* suck, we can't propagate the error upwards */
+-			g_warning ("error: %s", error->message);
+-			g_error_free (error);
++			if (error) {
++			    g_warning ("error: %s", error->message);
++			    g_error_free (error);
++			}
++			else {
++			    g_warning ("error: %s", "Corrupt document");
++			    g_warning ("unknown error parsing vt_cf");
++			}
+ 			g_free (res);
+ 			res = NULL;
+ 		}
diff --git a/libgsf.spec b/libgsf.spec
index 416492e..765d202 100644
--- a/libgsf.spec
+++ b/libgsf.spec
@@ -8,7 +8,7 @@ distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 Summary: GNOME Structured File library
 Name: libgsf
 Version: 1.14.19
-Release: 2%{?dist}
+Release: 3%{?dist}
 Group: System Environment/Libraries
 License: LGPLv2
 Source: ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/1.14/%{name}-%{version}.tar.bz2
@@ -17,6 +17,7 @@ Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: glib2-devel, perl-XML-Parser
 BuildRequires: libtool, libxml2-devel, glib2-devel, bzip2-devel, gettext
 BuildRequires: libbonobo-devel, pygtk2-devel, intltool, gnome-vfs2-devel
+Patch0: libgsf.gnome634435.avoidcrash.patch
 
 %description
 A library for reading and writing structured files (e.g. MS OLE and Zip)
@@ -62,6 +63,7 @@ Python bindings for libgsf
 
 %prep
 %setup -q
+%patch0 -p1 -b .gnome634435
 
 %build
 %configure --disable-gtk-doc --disable-static
@@ -139,6 +141,9 @@ fi
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
+* Tue Nov 09 2010 Caolán McNamara <caolanm at redhat.com> 1.14.19-3
+- Resolves: rhbz#650874 / gnome#634435 crash parsing ancient .ppt
+
 * Wed Sep 29 2010 jkeating - 1.14.19-2
 - Rebuilt for gcc bug 634757
 


More information about the scm-commits mailing list