aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-19 02:51:13 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-19 02:51:13 +0000
commit6f7784dccab8336b280702a6dc9ea48970dba07d (patch)
treef60c28c97c67cc7a25c6293edc5c7d7bbe96790a /channels
parent6d1fbd68c41e31b9fece8416104706322e3093a7 (diff)
Make sure the iax_pvt exists before dereferencing it.
This fixes the latest crash posted on issue 15609. (issue #15609) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@219586 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_iax2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index caf39cb1b..eb482bcde 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -8423,7 +8423,7 @@ static int socket_process(struct iax2_thread *thread)
* this connection yet. */
if ((dcallno != 1) && (fr->callno = find_callno(ntohs(mh->callno) & ~IAX_FLAG_FULL, dcallno, &sin, NEW_PREVENT, fd, 1))) {
ast_mutex_lock(&iaxsl[fr->callno]);
- if (ast_test_flag(iaxs[fr->callno], IAX_ENCRYPTED)) {
+ if (iaxs[fr->callno] && ast_test_flag(iaxs[fr->callno], IAX_ENCRYPTED)) {
if (decrypt_frame(fr->callno, fh, &f, &res)) {
ast_log(LOG_NOTICE, "Packet Decrypt Failed!\n");
ast_mutex_unlock(&iaxsl[fr->callno]);