Bug 1227481 - added a memset on aec. r=jesup
authorBogdan Postelnicu <bogdan.postelnicu>
Wed, 02 Dec 2015 05:05:00 +0100
changeset 275291 852c50e380c7d6db20f69f8ff1907bb6768b7c42
parent 275290 5426f80488404dddef150a8baab08d6bc9887690
child 275292 10e00e3565768b4dc1c16bea95f07da185eea1c7
push id29752
push usercbook@mozilla.com
push dateThu, 03 Dec 2015 11:03:31 +0000
treeherdermozilla-central@85cf2e720a84 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1227481
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1227481 - added a memset on aec. r=jesup
media/webrtc/trunk/webrtc/modules/audio_processing/aec/aec_core.c
--- a/media/webrtc/trunk/webrtc/modules/audio_processing/aec/aec_core.c
+++ b/media/webrtc/trunk/webrtc/modules/audio_processing/aec/aec_core.c
@@ -1487,16 +1487,19 @@ static void ProcessBlock(AecCore* aec) {
 
 AecCore* WebRtcAec_CreateAec() {
   int i;
   AecCore* aec = malloc(sizeof(AecCore));
   if (!aec) {
     return NULL;
   }
 
+  // set the mem with 0 in order to prevent garbage data
+  memset(aec, 0, sizeof(*aec));
+
   aec->nearFrBuf = WebRtc_CreateBuffer(FRAME_LEN + PART_LEN, sizeof(float));
   if (!aec->nearFrBuf) {
     WebRtcAec_FreeAec(aec);
     return NULL;
   }
 
   aec->outFrBuf = WebRtc_CreateBuffer(FRAME_LEN + PART_LEN, sizeof(float));
   if (!aec->outFrBuf) {