From ea9d0e5aa6a52e3a1d2bec7e793315862be5b4c4 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@fedoraproject.org>
Date: Mon, 16 Apr 2007 16:35:28 +0000
Subject: [PATCH] fix a crash in the info parser

---
 yelp-2.18.1-info-bc-crash.patch | 15 +++++++++++++++
 yelp.spec                       |  6 ++++++
 2 files changed, 21 insertions(+)
 create mode 100644 yelp-2.18.1-info-bc-crash.patch

diff --git a/yelp-2.18.1-info-bc-crash.patch b/yelp-2.18.1-info-bc-crash.patch
new file mode 100644
index 0000000..87e2a65
--- /dev/null
+++ b/yelp-2.18.1-info-bc-crash.patch
@@ -0,0 +1,15 @@
+--- yelp-info-parser.c.info-bc	2007-03-26 01:33:52.000000000 -0400
++++ yelp-info-parser.c	2007-03-26 01:22:15.000000000 -0400
+@@ -354,6 +354,12 @@
+       title = gtk_tree_model_get_string_from_iter (model, r);
+   }
+ 
++  if (!g_str_equal (title, reftitle))
++    {
++      gtk_tree_iter_free (tmp);
++      tmp = NULL;
++    }
++
+   gtk_tree_iter_free (r);
+   g_free (title);
+   g_free (reftitle);
diff --git a/yelp.spec b/yelp.spec
index 1fb199b..a3fd8ea 100644
--- a/yelp.spec
+++ b/yelp.spec
@@ -28,6 +28,8 @@ 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=370167 
 Patch5: yelp-2.16.0-apropos.patch
+# http://bugzilla.gnome.org/show_bug.cgi?id=430365 
+Patch6: yelp-2.18.1-info-bc-crash.patch
 
 License: GPL
 Group: Applications/System
@@ -85,6 +87,7 @@ one central tool.
 %patch2 -p1 -b .add-mime-handling
 %patch3 -p1 -b .use-pango
 %patch5 -p1 -b .apropos
+%patch6 -p1 -b .info-bc-crash
 
 %build
 %configure 			\
@@ -149,6 +152,9 @@ update-desktop-database &> /dev/null ||:
 %{_datadir}/yelp
 
 %changelog
+* Tue Apr 17 2007 Matthias Clasen <mclasen@redhat.com> - 2.18.1-2
+- Fix a crash in the info parser (#216308)
+
 * Mon Apr 09 2007 Matthew Barnes <mbarnes@redhat.com> - 2.18.1-1
 - Update to 2.18.1