[asterisk-commits] dvossel: branch 1.8 r290506 - /branches/1.8/channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 5 17:23:04 CDT 2010


Author: dvossel
Date: Tue Oct  5 17:23:00 2010
New Revision: 290506

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=290506
Log:
Fixes uninitialized memory problem in 'iax2 set debug peer' option.

Modified:
    branches/1.8/channels/chan_iax2.c

Modified: branches/1.8/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_iax2.c?view=diff&rev=290506&r1=290505&r2=290506
==============================================================================
--- branches/1.8/channels/chan_iax2.c (original)
+++ branches/1.8/channels/chan_iax2.c Tue Oct  5 17:23:00 2010
@@ -7312,7 +7312,6 @@
 		struct iax2_peer *peer;
 		struct sockaddr_in peer_addr;
 
-		ast_sockaddr_to_sin(&peer->addr, &peer_addr);
 
 		if (a->argc != e->args + 1)
 			return CLI_SHOWUSAGE;
@@ -7323,6 +7322,8 @@
 			ast_cli(a->fd, "IAX2 peer '%s' does not exist\n", a->argv[e->args-1]);
 			return CLI_FAILURE;
 		}
+
+		ast_sockaddr_to_sin(&peer->addr, &peer_addr);
 
 		debugaddr.sin_addr = peer_addr.sin_addr;
 		debugaddr.sin_port = peer_addr.sin_port;




More information about the asterisk-commits mailing list