mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user