rpms/GConf2/devel gsettings-data-convert-realloc.patch, NONE, 1.1 GConf2.spec, 1.137, 1.138

Matthew Garrett mjg59 at fedoraproject.org
Tue Jun 29 20:27:06 UTC 2010


Author: mjg59

Update of /cvs/pkgs/rpms/GConf2/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv14489

Modified Files:
	GConf2.spec 
Added Files:
	gsettings-data-convert-realloc.patch 
Log Message:
* Tue Jun 29 2010 Matthew Garrett <mjg at redhat.com> - 2.31.5-2
- Fix crasher in gsettings-data-convert caused by wrong realloc size


gsettings-data-convert-realloc.patch:
 gsettings-data-convert.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE gsettings-data-convert-realloc.patch ---
commit 60e77f638c6bf3fcc147cfabde0384c31a5c797d
Author: Matthew Garrett <mjg at redhat.com>
Date:   Tue Jun 29 15:29:26 2010 -0400

    Realloc the correct amount of memory
    
    Pointers are more than a byte long - make sure that we realloc enough space
    to fit another one.

diff --git a/gsettings/gsettings-data-convert.c b/gsettings/gsettings-data-convert.c
index d61c4be..ea9fe21 100644
--- a/gsettings/gsettings-data-convert.c
+++ b/gsettings/gsettings-data-convert.c
@@ -449,7 +449,7 @@ main (int argc, char *argv[])
 
           /* Add the the file to the converted list */
           len = g_strv_length (converted);
-          converted = g_realloc (converted, len + 1);
+          converted = g_realloc (converted, (len + 2) * sizeof(gchar *));
           converted[len] = g_strdup (name);
           converted[len + 1] = NULL;
         }


Index: GConf2.spec
===================================================================
RCS file: /cvs/pkgs/rpms/GConf2/devel/GConf2.spec,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -p -r1.137 -r1.138
--- GConf2.spec	29 Jun 2010 14:32:23 -0000	1.137
+++ GConf2.spec	29 Jun 2010 20:27:06 -0000	1.138
@@ -7,7 +7,7 @@
 Summary: A process-transparent configuration system
 Name: GConf2
 Version: 2.31.5
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: LGPLv2+
 Group: System Environment/Base
 #VCS: git:git://git.gnome.org/gconf
@@ -41,6 +41,8 @@ Conflicts: GConf2-dbus
 Patch0: GConf-2.18.0.1-reload.patch
 # http://bugzilla.gnome.org/show_bug.cgi?id=568845
 Patch1: GConf-gettext.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=609187
+Patch2: gsettings-data-convert-realloc.patch
 
 %description
 GConf is a process-transparent configuration database API used to
@@ -77,7 +79,7 @@ which require GTK+.
 %setup -q -n GConf-%{version}
 %patch0 -p1 -b .reload
 %patch1 -p1 -b .gettext
-
+%patch2 -p1 -b .realloc
 %build
 %configure --disable-static --enable-defaults-service
 
@@ -169,6 +171,9 @@ fi
 %doc %{_mandir}/man1/gsettings-schema-convert.1*
 
 %changelog
+* Tue Jun 29 2010 Matthew Garrett <mjg at redhat.com> - 2.31.5-2
+- Fix crasher in gsettings-data-convert caused by wrong realloc size
+
 * Tue Jun 29 2010 Matthias Clasen <mclasen at redhat.com> - 2.31.5-1
 - Update to 2.31.5
 



More information about the scm-commits mailing list