From c64246f42cabeeb13d1188df61398f231068ff39 Mon Sep 17 00:00:00 2001 From: "henrik.lundin@webrtc.org" Date: Mon, 8 Sep 2014 13:40:58 +0000 Subject: [PATCH] Set a default speech type in iSAC wrapper If the decoder encounters an error, it may leave the speech type unassigned, leading to a use-of-uninitialized-value in subsequent lines. BUG=crbug/411162 R=bjornv@webrtc.org Review URL: https://webrtc-codereview.appspot.com/23519004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7104 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/audio_coding/main/acm2/acm_isac.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc/modules/audio_coding/main/acm2/acm_isac.cc b/webrtc/modules/audio_coding/main/acm2/acm_isac.cc index 2adae861b2..e12255957f 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_isac.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_isac.cc @@ -736,7 +736,7 @@ int ACMISAC::Decode(const uint8_t* encoded, size_t encoded_len, int16_t* decoded, SpeechType* speech_type) { - int16_t temp_type; + int16_t temp_type = 1; // Default is speech. CriticalSectionScoped lock(codec_inst_crit_sect_.get()); int ret = ACM_ISAC_DECODE_B(static_cast(codec_inst_ptr_->inst),