[gedit/f15] Fix double-free during incremental search

Daniel Williams dcbw at fedoraproject.org
Wed May 25 14:43:51 UTC 2011


commit d9d5e0e31e0b93f6b585988e8ed45b92b14bcb96
Author: Dan Williams <dcbw at redhat.com>
Date:   Wed May 25 09:45:52 2011 -0500

    Fix double-free during incremental search
    
    Clean up stale patches too

 gedit-2.13.2-filesel.patch           |  172 ----------------------------------
 gedit-2.25.5-fix-python-path.patch   |   23 -----
 gedit-3.0.2-search-double-free.patch |   11 ++
 gedit-gsettings-migration.patch      |   64 -------------
 gedit.spec                           |   12 ++-
 5 files changed, 19 insertions(+), 263 deletions(-)
---
diff --git a/gedit-3.0.2-search-double-free.patch b/gedit-3.0.2-search-double-free.patch
new file mode 100644
index 0000000..7f2d7af
--- /dev/null
+++ b/gedit-3.0.2-search-double-free.patch
@@ -0,0 +1,11 @@
+diff -up gedit-3.0.2/gedit/gedit-view-frame.c.foo gedit-3.0.2/gedit/gedit-view-frame.c
+--- gedit-3.0.2/gedit/gedit-view-frame.c.foo	2011-05-25 09:36:42.453489684 -0500
++++ gedit-3.0.2/gedit/gedit-view-frame.c	2011-05-25 09:36:50.459389598 -0500
+@@ -1246,6 +1246,7 @@ init_search_entry (GeditViewFrame *frame
+ 		gint      sel_len = 0;
+ 
+ 		g_free (frame->priv->old_search_text);
++		frame->priv->old_search_text = NULL;
+ 
+ 		old_find_text = gedit_document_get_search_text (GEDIT_DOCUMENT (buffer),
+ 		                                                &old_find_flags);
diff --git a/gedit.spec b/gedit.spec
index bcc7b93..8803264 100644
--- a/gedit.spec
+++ b/gedit.spec
@@ -11,7 +11,7 @@ Summary:	Text editor for the GNOME desktop
 Name:		gedit
 Epoch:		2
 Version: 	3.0.2
-Release:        1%{?dist}
+Release:        2%{?dist}
 License:	GPLv2+ and GFDL
 Group:		Applications/Editors
 #VCS: git:git://git.gnome.org/gedit
@@ -22,9 +22,8 @@ URL:		http://projects.gnome.org/gedit/
 Requires(post):         desktop-file-utils >= %{desktop_file_utils_version}
 Requires(postun):       desktop-file-utils >= %{desktop_file_utils_version}
 
-# Make the file selector remember last window size
-# This patch needs to go upstream
-#Patch0: gedit-2.13.2-filesel.patch
+Patch0: gedit-3.0.2-search-double-free.patch
+
 %ifarch ppc64,x86_64,ia64,s390x
 Patch1: gedit-2.13.90-libdir.patch
 %endif
@@ -87,6 +86,8 @@ Install gedit-devel if you want to write plugins for gedit.
 %prep
 %setup -n gedit-%{version} -q
 
+%patch0 -p1 -b .search-double-free
+
 %ifarch ppc64,x86_64,ia64,s390x
 %patch1 -p1 -b .libdir
 %endif
@@ -168,6 +169,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas
 %{_datadir}/gtk-doc
 
 %changelog
+* Wed May 25 2011 Dan Williams <dcbw at redhat.com> 2:3.0.2-2
+- Fix double-free when searching
+
 * Tue Apr 26 2011 Matthias Clasen <mclasen at redhat.com> 2:3.0.2-1
 - Update to 3.0.2
 


More information about the scm-commits mailing list