Archived
14
0
Fork 0

Merged revisions 219586 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r219586 | russell | 2009-09-18 21:51:13 -0500 (Fri, 18 Sep 2009) | 6 lines
  
  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/trunk@219587 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
russell 2009-09-19 02:59:52 +00:00
parent c6b45bd6c9
commit 62e02563d4

View file

@ -9546,7 +9546,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_flag64(iaxs[fr->callno], IAX_ENCRYPTED)) {
if (iaxs[fr->callno] && ast_test_flag64(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]);