gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r21316 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r21316 - gnunet/src/transport
Date: Mon, 7 May 2012 10:40:43 +0200

Author: grothoff
Date: 2012-05-07 10:40:43 +0200 (Mon, 07 May 2012)
New Revision: 21316

Modified:
   gnunet/src/transport/plugin_transport_unix.c
Log:
-fix uaf

Modified: gnunet/src/transport/plugin_transport_unix.c
===================================================================
--- gnunet/src/transport/plugin_transport_unix.c        2012-05-07 08:25:49 UTC 
(rev 21315)
+++ gnunet/src/transport/plugin_transport_unix.c        2012-05-07 08:40:43 UTC 
(rev 21316)
@@ -280,7 +280,8 @@
 get_session_delete_it (void *cls, const GNUNET_HashCode * key, void *value)
 {
   struct Session *s = value;
-  struct UNIXMessageWrapper * msgw;
+  struct UNIXMessageWrapper *msgw;
+  struct UNIXMessageWrapper *next;
   struct Plugin *plugin = cls;
   int removed;
   GNUNET_assert (plugin != NULL);
@@ -290,8 +291,11 @@
 
   msgw = plugin->msg_head;
   removed = GNUNET_NO;
-  for (msgw = plugin->msg_head; NULL != msgw; msgw = msgw->next)
+  next = plugin->msg_head;
+  while (NULL != next)
   {
+    msgw = next;
+    next = msgw->next;
     if (msgw->session != s)
       continue;
     GNUNET_CONTAINER_DLL_remove (plugin->msg_head, plugin->msg_tail, msgw);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]