From d6bda0950316f5c335f4471349bd518b2e7ba47f Mon Sep 17 00:00:00 2001 From: "pbos@webrtc.org" Date: Tue, 7 Oct 2014 19:23:43 +0000 Subject: [PATCH] Initialize sctp_paddrparams in OpenSctpSocket(). Addresses 'use-of-uninitialized-value' detected with MemorySanitizer. params.spp_address.sa_family was used without being initialized before when calling usrsctp_setsockopt with SCTP_PEER_ADDR_PARAMS. R=jiayl@webrtc.org BUG= Review URL: https://webrtc-codereview.appspot.com/23909004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7389 4adac7df-926f-26a2-2b94-8c16560cd09d --- talk/media/sctp/sctpdataengine.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/talk/media/sctp/sctpdataengine.cc b/talk/media/sctp/sctpdataengine.cc index 88dade79f..4442878f8 100644 --- a/talk/media/sctp/sctpdataengine.cc +++ b/talk/media/sctp/sctpdataengine.cc @@ -379,7 +379,7 @@ bool SctpDataMediaChannel::OpenSctpSocket() { } // Disable MTU discovery - struct sctp_paddrparams params; + struct sctp_paddrparams params = {0}; params.spp_assoc_id = 0; params.spp_flags = SPP_PMTUD_DISABLE; params.spp_pathmtu = kSctpMtu;