From: Jeff Peeler Date: Tue, 6 Oct 2009 22:30:11 +0000 (+0000) Subject: Fix potential crash when entire span request is received. X-Git-Tag: 1.6.1.10-rc1~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09051408dfb9f68a4ab7a9e9f12a321000fe6e32;p=thirdparty%2Fasterisk.git Fix potential crash when entire span request is received. 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.1@222396 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index fc88cb7740..d68876a7f0 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -11178,8 +11178,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);