]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix an issue that could potentially cause corruption of the global iax frame
authorRussell Bryant <russell@russellbryant.com>
Mon, 30 Jul 2007 20:16:43 +0000 (20:16 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 30 Jul 2007 20:16:43 +0000 (20:16 +0000)
queue.  In the network_thread() loop, it traverses the list using the
AST_LIST_TRAVERSE_SAFE macro.  However, to remove an element of the list within
this loop, it used AST_LIST_REMOVE, instead of AST_LIST_REMOVE_CURRENT, which I
believe could leave some of the internal variables of the SAFE macro invalid.
Mihai says that he already made this change in his local copy and it didn't help
his VNAK storm issues, but I still think it's wrong.  :)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@77794 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 8b4df85a5d6f884a908d84a0473ad50525bcd384..7aed23fac1f5061df4e99ed21b981681acf5c6ed 100644 (file)
@@ -8337,7 +8337,7 @@ static void *network_thread(void *ignore)
 
                        if (f->retries < 0) {
                                /* This is not supposed to be retransmitted */
-                               AST_LIST_REMOVE(&iaxq.queue, f, list);
+                               AST_LIST_REMOVE_CURRENT(&iaxq.queue, list);
                                iaxq.count--;
                                /* Free the iax frame */
                                iax_frame_free(f);