From 886fd82b35d165d6efda3facf7b3194bf2152c96 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 18 Feb 2011 17:45:55 -0500 Subject: [PATCH 1/2] Fix a crash --- ...ly-return-NULL-from-parse_style_valu.patch | 30 +++++++++++++++++++ librsvg2.spec | 10 ++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 0001-Don-t-accidentally-return-NULL-from-parse_style_valu.patch diff --git a/0001-Don-t-accidentally-return-NULL-from-parse_style_valu.patch b/0001-Don-t-accidentally-return-NULL-from-parse_style_valu.patch new file mode 100644 index 0000000..781c957 --- /dev/null +++ b/0001-Don-t-accidentally-return-NULL-from-parse_style_valu.patch @@ -0,0 +1,30 @@ +From 197a8fe3b15d01893ab0d1cd64e23dfeb7ca75a9 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Fri, 18 Feb 2011 17:27:26 -0500 +Subject: [PATCH] Don't accidentally return NULL from parse_style_value() + +Callers don't expect it and things go bad... +https://bugzilla.gnome.org/show_bug.cgi?id=626802 +--- + rsvg-styles.c | 5 ++++- + 1 files changed, 4 insertions(+), 1 deletions(-) + +diff --git a/rsvg-styles.c b/rsvg-styles.c +index bd59a10..7498ec9 100644 +--- a/rsvg-styles.c ++++ b/rsvg-styles.c +@@ -887,7 +887,10 @@ parse_style_value (const gchar *string, gchar **value, gboolean *important) + } else { + *important = FALSE; + } +- *value = g_strdup (g_strstrip (strings[0])); ++ if (strings[0]) ++ *value = g_strdup (g_strstrip (strings[0])); ++ else ++ *value = g_strdup (""); + + g_strfreev (strings); + +-- +1.7.4.1 + diff --git a/librsvg2.spec b/librsvg2.spec index 5d4875a..9e41fee 100644 --- a/librsvg2.spec +++ b/librsvg2.spec @@ -1,13 +1,17 @@ Name: librsvg2 Summary: An SVG library based on cairo Version: 2.32.1 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ Group: System Environment/Libraries #VCS: git:git://git.gnome.org/librsvg Source: http://download.gnome.org/sources/librsvg/2.32/librsvg-%{version}.tar.bz2 +# upstream change +Patch0: 0001-Don-t-accidentally-return-NULL-from-parse_style_valu.patch + + Requires(post): gdk-pixbuf2 Requires(postun): gdk-pixbuf2 BuildRequires: libpng-devel @@ -45,6 +49,7 @@ files to allow you to develop with librsvg. %prep %setup -q -n librsvg-%{version} +%patch0 -p1 -b .null-crash %build GDK_PIXBUF_QUERYLOADERS=/usr/bin/gdk-pixbuf-query-loaders-%{__isa_bits} @@ -95,6 +100,9 @@ gdk-pixbuf-query-loaders-%{__isa_bits} --update-cache || : %changelog +* Fri Feb 18 2010 Matthias Clasen - 2.32.1-3 +- Fix a crash (#603183) + * Tue Feb 08 2011 Fedora Release Engineering - 2.32.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From 22e35af3d7c1ebdf67a16e8dcf113bf4883f37b4 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 18 Feb 2011 17:45:55 -0500 Subject: [PATCH 2/2] Fix a crash --- librsvg2.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/librsvg2.spec b/librsvg2.spec index 9e41fee..a61beb3 100644 --- a/librsvg2.spec +++ b/librsvg2.spec @@ -100,7 +100,7 @@ gdk-pixbuf-query-loaders-%{__isa_bits} --update-cache || : %changelog -* Fri Feb 18 2010 Matthias Clasen - 2.32.1-3 +* Fri Feb 18 2011 Matthias Clasen - 2.32.1-3 - Fix a crash (#603183) * Tue Feb 08 2011 Fedora Release Engineering - 2.32.1-2