[svn-commits] mmichelson: trunk r267097 - /trunk/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jun 2 13:13:21 CDT 2010


Author: mmichelson
Date: Wed Jun  2 13:13:18 2010
New Revision: 267097

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=267097
Log:
Prevent use of uninitialized values.

Two struct sockaddr_ins are created when applying directmedia
host access rules. The addresses of these are passed to the RTP
engine to be filled in. However, the RTP engine inspects the fields
of the structs before actually taking action. This inspection caused
valgrind to be a bit unhappy.


Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=267097&r1=267096&r2=267097
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Jun  2 13:13:18 2010
@@ -26537,7 +26537,7 @@
 
 static int apply_directmedia_ha(struct sip_pvt *p, const char *op)
 {
-	struct sockaddr_in us, them;
+	struct sockaddr_in us = {0,}, them = {0,};
 	int res;
 
 	ast_rtp_instance_get_remote_address(p->rtp, &them);




More information about the svn-commits mailing list