From 974bbbb352f61f7e7c0d959858a9c471ce0f26f0 Mon Sep 17 00:00:00 2001 From: "jiayl@webrtc.org" Date: Tue, 1 Jul 2014 18:33:07 +0000 Subject: [PATCH] Fix uninitialized value in DtlsTransport and TransportDescription. BUG=crbug/390304 R=wu@webrtc.org Review URL: https://webrtc-codereview.appspot.com/21779004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6577 4adac7df-926f-26a2-2b94-8c16560cd09d --- talk/p2p/base/dtlstransport.h | 3 ++- talk/p2p/base/transportdescription.h | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/talk/p2p/base/dtlstransport.h b/talk/p2p/base/dtlstransport.h index 6bef185ce8..641f57275d 100644 --- a/talk/p2p/base/dtlstransport.h +++ b/talk/p2p/base/dtlstransport.h @@ -49,7 +49,8 @@ class DtlsTransport : public Base { PortAllocator* allocator, talk_base::SSLIdentity* identity) : Base(signaling_thread, worker_thread, content_name, allocator), - identity_(identity) { + identity_(identity), + secure_role_(talk_base::SSL_CLIENT) { } ~DtlsTransport() { diff --git a/talk/p2p/base/transportdescription.h b/talk/p2p/base/transportdescription.h index 59dfa0b47d..a8233a61f3 100644 --- a/talk/p2p/base/transportdescription.h +++ b/talk/p2p/base/transportdescription.h @@ -99,7 +99,9 @@ bool ConnectionRoleToString(const ConnectionRole& role, std::string* role_str); typedef std::vector Candidates; struct TransportDescription { - TransportDescription() : ice_mode(ICEMODE_FULL) {} + TransportDescription() + : ice_mode(ICEMODE_FULL), + connection_role(CONNECTIONROLE_NONE) {} TransportDescription(const std::string& transport_type, const std::vector& transport_options,