Check to see if the channel that is activating the IAXPEER function is actually

an IAX2 channel before proceeding to process it to avoid crashing.
(issue #8017, reported by admott, fixed by myself)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.2
Russell Bryant 19 years ago
parent c6e25717b4
commit 00ca92aeee

@ -9342,6 +9342,11 @@ static char *function_iaxpeer(struct ast_channel *chan, char *cmd, char *data, c
char *peername, *colname;
char iabuf[INET_ADDRSTRLEN];
buf[0] = '\0';
if (chan->tech != &iax2_tech)
return buf;
if (!(peername = ast_strdupa(data))) {
ast_log(LOG_ERROR, "Memory Error!\n");
return ret;

Loading…
Cancel
Save