]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix potential crash when entire span request is received.
authorJeff Peeler <jpeeler@digium.com>
Tue, 6 Oct 2009 22:29:20 +0000 (22:29 +0000)
committerJeff Peeler <jpeeler@digium.com>
Tue, 6 Oct 2009 22:29:20 +0000 (22:29 +0000)
The variable index used in this scenario for accessing the dahdi_pvts was
wrong and was most likely copied from the several other places it is used
correctly.

(closes issue #15998)
Reported by: tsearle
Patches:
     dahdi_reset_crash.patch uploaded by tsearle (license 373)

Modified:
   branches/1.4/channels/chan_dahdi.c

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

channels/chan_dahdi.c

index f569eb2c7fa81fa3b7c794637a44c47d536dceab..8d17d6e9f77089c00808912dfbc21124ae3a2a6d 100644 (file)
@@ -10997,8 +10997,8 @@ static void *pri_dchannel(void *vpri)
                                                                pri_destroycall(pri->pri, pri->pvts[x]->call);
                                                                pri->pvts[x]->call = NULL;
                                                        }
-                                                       if (pri->pvts[chanpos]->realcall) 
-                                                               pri_hangup_all(pri->pvts[chanpos]->realcall, pri);
+                                                       if (pri->pvts[x]->realcall) 
+                                                               pri_hangup_all(pri->pvts[x]->realcall, pri);
                                                        else if (pri->pvts[x]->owner)
                                                                pri->pvts[x]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
                                                        ast_mutex_unlock(&pri->pvts[x]->lock);