[asterisk-commits] russell: branch 1.8 r359558 - /branches/1.8/channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 14 19:52:21 CDT 2012


Author: russell
Date: Wed Mar 14 19:52:17 2012
New Revision: 359558

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=359558
Log:
chan_iax2: Fix use of uninitialized sockaddr_in in try_transfer().

Initialize a struct sockaddr_in in try_transfer() so that the code isn't
(potentially) trying to read from it while uninitialized.

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=359558&r1=359557&r2=359558
==============================================================================
--- branches/1.8/channels/chan_iax2.c (original)
+++ branches/1.8/channels/chan_iax2.c Wed Mar 14 19:52:17 2012
@@ -8294,9 +8294,8 @@
 	int newcall = 0;
 	char newip[256];
 	struct iax_ie_data ied;
-	struct sockaddr_in new;
-	
-	
+	struct sockaddr_in new = { 0, };
+
 	memset(&ied, 0, sizeof(ied));
 	if (ies->apparent_addr)
 		memmove(&new, ies->apparent_addr, sizeof(new));




More information about the asterisk-commits mailing list