From e9d0cda77d4b0ecdb1d954c24cdde6161638fbaf Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Mon, 18 Feb 2008 16:40:36 +0000 Subject: [PATCH] Merged revisions 103770 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r103770 | mmichelson | 2008-02-18 10:37:31 -0600 (Mon, 18 Feb 2008) | 10 lines Fix a linked list corruption that under the right circumstances could lead to a looped list, meaning it will traverse forever. (closes issue #11818) Reported by: michael-fig Patches: 11818.patch uploaded by putnopvut (license 60) Tested by: michael-fig ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103771 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_zap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/channels/chan_zap.c b/channels/chan_zap.c index d7676b3598..f5ea1ff341 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -8678,7 +8678,10 @@ static struct zt_pvt *chandup(struct zt_pvt *src) } p->destroy = 1; p->next = iflist; + p->prev = NULL; iflist = p; + if (iflist->next) + iflist->next->prev = p; return p; } -- 2.47.2