rpms/gok/devel gok-1.0.5-realloc.patch,NONE,1.1 gok.spec,1.23,1.24

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Nov 21 18:45:20 UTC 2005


Author: mclasen

Update of /cvs/dist/rpms/gok/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv21985

Modified Files:
	gok.spec 
Added Files:
	gok-1.0.5-realloc.patch 
Log Message:
Fix memory handling errors


gok-1.0.5-realloc.patch:
 arraylist.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE gok-1.0.5-realloc.patch ---
--- gok-1.0.5/gok/arraylist.c.realloc	2005-11-21 13:39:58.000000000 -0500
+++ gok-1.0.5/gok/arraylist.c	2005-11-21 13:40:29.000000000 -0500
@@ -118,7 +118,7 @@
 	      new_capacity = list->_current_capacity - ARRAYLIST_CAPACITY_DELTA;
 	      if (new_capacity > new_size)
 		{
-		  realloc(list->_data, object_size * new_capacity);
+		  list->_data = realloc(list->_data, object_size * new_capacity);
 		  list->_current_capacity = new_capacity;
 		}
 	    }
@@ -165,7 +165,7 @@
 
 void arraylist_clear(const Arraylist list)
 {
-  realloc(list->_data, object_size * ARRAYLIST_INITIAL_CAPACITY);
+  list->_data = realloc(list->_data, object_size * ARRAYLIST_INITIAL_CAPACITY);
   list->_current_capacity = ARRAYLIST_INITIAL_CAPACITY;
   list->_size = 0;
 }


Index: gok.spec
===================================================================
RCS file: /cvs/dist/rpms/gok/devel/gok.spec,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- gok.spec	19 Nov 2005 04:15:28 -0000	1.23
+++ gok.spec	21 Nov 2005 18:45:17 -0000	1.24
@@ -3,13 +3,15 @@
 Summary: GNOME Onscreen Keyboard
 Name: gok
 Version: 1.0.5
-Release: 4
+Release: 5
 License: GPL
 Group: Desktop/Accessibility
 URL: http://www.gok.ca/
 Source0: ftp://ftp.gnome.org/pub/GNOME/sources/gok/1.0/%{name}-%{version}.tar.bz2
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 Patch2: gok-0.10.2-launcher.patch
+# http://bugzilla.gnome.org/show_bug.cgi?id=322062
+Patch3: gok-1.0.5-realloc.patch
 
 PreReq:         scrollkeeper >= 0.1.4
 PreReq:		at-spi
@@ -47,6 +49,7 @@
 %prep
 %setup -q
 %patch2 -p1 -b .launcher
+%patch3 -p1 -b .realloc
 
 %build
 %configure
@@ -101,6 +104,9 @@
 %{_libdir}/pkgconfig/*pc
 
 %changelog
+* Mon Nov 21 2005 Matthias Clasen <mclasen at redhat.com>
+- fix memory handling errors 
+
 * Fri Nov 18 2005 Bill Nottingham <notting at redhat.com>
 - with modular X in /usr/%{_lib}, libdir patch isn't needed - remove it
 




More information about the fedora-cvs-commits mailing list