From 6482e8548a8d80a4926fd87306cda2a245feac93 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 5 Nov 2007 23:17:21 +0000 Subject: [PATCH] Fix another crash --- search-crash.patch | 17 +++++++++++++++++ yelp.spec | 9 ++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 search-crash.patch diff --git a/search-crash.patch b/search-crash.patch new file mode 100644 index 0000000..8854400 --- /dev/null +++ b/search-crash.patch @@ -0,0 +1,17 @@ +diff -up yelp-2.20.0/src/yelp-search-parser.c.search-crash yelp-2.20.0/src/yelp-search-parser.c +--- yelp-2.20.0/src/yelp-search-parser.c.search-crash 2007-09-17 16:49:09.000000000 -0400 ++++ yelp-2.20.0/src/yelp-search-parser.c 2007-11-05 18:13:09.000000000 -0500 +@@ -1074,8 +1074,11 @@ slow_search_process (RrnReg *reg, Search + + ptr = g_strrstr (container->base_filename, "/"); + +- path = g_strndup (container->base_filename, +- ptr - container->base_filename); ++ if (ptr) ++ path = g_strndup (container->base_filename, ++ ptr - container->base_filename); ++ else ++ path = g_strdup (container->base_filename); + + /* BEGIN HTML special block */ + if (reg->type && (g_str_equal (reg->type, "text/html") || diff --git a/yelp.spec b/yelp.spec index 051089c..3ce6d35 100644 --- a/yelp.spec +++ b/yelp.spec @@ -20,7 +20,7 @@ Summary: A system documentation reader from the Gnome project Name: yelp Version: 2.20.0 -Release: 4%{?dist} +Release: 5%{?dist} Source: http://ftp.gnome.org/pub/GNOME/sources/yelp/2.19/%{name}-%{version}.tar.bz2 URL: http://live.gnome.org/Yelp # http://bugzilla.gnome.org/show_bug.cgi?id=319096 @@ -29,6 +29,9 @@ Patch2: yelp-2.13.2-add-mime-handling.patch Patch3: yelp-2.15.91-use-pango.patch # http://bugzilla.gnome.org/show_bug.cgi?id=493594 Patch4: rarian-crash.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=493751 +Patch5: search-crash.patch + # http://bugzilla.gnome.org/show_bug.cgi?id=431077 # XXX Does this no longer apply to yelp >= 2.19.1 ? #Patch8: yelp-2.18.1-posix-man.patch @@ -87,6 +90,7 @@ one central tool. %patch2 -p1 -b .add-mime-handling %patch3 -p1 -b .use-pango %patch4 -p1 -b .rarian-crash +%patch5 -p1 -b .search-crash #%patch8 -p1 -b .posix-man %build @@ -151,6 +155,9 @@ update-desktop-database &> /dev/null ||: %{_datadir}/yelp %changelog +* Mon Nov 5 2007 Matthias Clasen - 2.20.0-5 +- Fix a crash in search (#361041) + * Sun Nov 4 2007 Matthias Clasen - 2.20.0-4 - Fix a crash when loading the rarian docs