[prev in list] [next in list] [prev in thread] [next in thread]
List: asterisk-commits
Subject: [asterisk-commits] branch 1.2 r16771 -
From: asterisk-commits () lists ! digium ! com (asterisk-commits () lists ! digium ! com)
Date: 2006-03-31 12:11:11
Message-ID: 20060331191129.26A2AAF428C () abita ! digium ! internal
[Download RAW message or body]
Author: russell
Date: Fri Mar 31 13:11:26 2006
New Revision: 16771
URL: http://svn.digium.com/view/asterisk?rev=16771&view=rev
Log:
move a NULL check to before the first time the pointer is dereferenced (issue #6832)
Modified:
branches/1.2/channels/chan_iax2.c
Modified: branches/1.2/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_iax2.c?rev=16771&r1=16770&r2=16771&view=diff
==============================================================================
--- branches/1.2/channels/chan_iax2.c (original)
+++ branches/1.2/channels/chan_iax2.c Fri Mar 31 13:11:26 2006
@@ -1486,6 +1486,8 @@
int res;
char iabuf[INET_ADDRSTRLEN];
/* Called with iaxsl held */
+ if (!iaxs[f->callno])
+ return -1;
if (option_debug > 2 && iaxdebug)
ast_log(LOG_DEBUG, "Sending %d on %d/%d to %s:%d\n", f->ts, f->callno, \
iaxs[f->callno]->peercallno, ast_inet_ntoa(iabuf, sizeof(iabuf), \
iaxs[f->callno]->addr.sin_addr), ntohs(iaxs[f->callno]->addr.sin_port)); /* Don't \
send if there was an error, but return error instead */ @@ -1493,8 +1495,6 @@
ast_log(LOG_WARNING, "Call number = %d\n", f->callno);
return -1;
}
- if (!iaxs[f->callno])
- return -1;
if (iaxs[f->callno]->error)
return -1;
if (f->transfer) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic