[asterisk-commits] russell: branch 1.2 r43552 - /branches/1.2/channels/chan_iax2.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Sep 24 06:50:31 MST 2006


Author: russell
Date: Sun Sep 24 08:50:30 2006
New Revision: 43552

URL: http://svn.digium.com/view/asterisk?rev=43552&view=rev
Log:
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)

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=43552&r1=43551&r2=43552&view=diff
==============================================================================
--- branches/1.2/channels/chan_iax2.c (original)
+++ branches/1.2/channels/chan_iax2.c Sun Sep 24 08:50:30 2006
@@ -9342,6 +9342,11 @@
 	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;



More information about the asterisk-commits mailing list