SOURCES: irssi-invalid_free.patch (NEW) - fix invalid free().

pluto pluto at pld-linux.org
Tue May 2 22:44:06 CEST 2006


Author: pluto                        Date: Tue May  2 20:44:06 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix invalid free().

---- Files affected:
SOURCES:
   irssi-invalid_free.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/irssi-invalid_free.patch
diff -u /dev/null SOURCES/irssi-invalid_free.patch:1.1
--- /dev/null	Tue May  2 22:44:06 2006
+++ SOURCES/irssi-invalid_free.patch	Tue May  2 22:44:01 2006
@@ -0,0 +1,21 @@
+after call of g_slist_remove() the `pos` points to released area,
+so dereferencing pos->data isn't acceptable.
+
+--- irssi-0.8.10/src/irc/dcc/dcc.c.orig	2005-10-19 04:13:31.000000000 +0200
++++ irssi-0.8.10/src/irc/dcc/dcc.c	2006-05-02 22:33:11.000000000 +0200
+@@ -55,11 +55,13 @@
+ void dcc_unregister_type(const char *type)
+ {
+ 	GSList *pos;
++	gpointer data;
+ 
+ 	pos = gslist_find_string(dcc_types, type);
+ 	if (pos != NULL) {
+-                dcc_types = g_slist_remove(dcc_types, pos->data);
+-		g_free(pos->data);
++		data = pos->data;
++		dcc_types = g_slist_remove(dcc_types, data);
++		g_free(data);
+ 	}
+ }
+ 
================================================================


More information about the pld-cvs-commit mailing list