]> git.pld-linux.org Git - packages/irssi.git/commitdiff
- fix invalid free().
authorPaweł Sikora <pluto@pld-linux.org>
Tue, 2 May 2006 20:44:01 +0000 (20:44 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    irssi-invalid_free.patch -> 1.1

irssi-invalid_free.patch [new file with mode: 0644]

diff --git a/irssi-invalid_free.patch b/irssi-invalid_free.patch
new file mode 100644 (file)
index 0000000..f5d2bcf
--- /dev/null
@@ -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);
+       }
+ }
This page took 0.135485 seconds and 4 git commands to generate.