Replacing undefined left shifts with multiplication.

Issue was found by the Audio Processing fuzzer.

Bug: chromium:778939, chromium:778921, chromium:778919
Change-Id: If613cf4c533f546d118f10a6358cecd329958177
Reviewed-on: https://webrtc-review.googlesource.com/16161
Commit-Queue: Alex Loiko <aleloi@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20494}
This commit is contained in:
Alex Loiko 2017-10-27 16:21:31 +02:00 committed by Commit Bot
parent e68c951691
commit 187c6992fb
2 changed files with 2 additions and 2 deletions

View file

@ -141,7 +141,7 @@ void WebRtcSpl_UpsampleBy2(const int16_t* in, size_t len,
for (i = len; i > 0; i--) {
// lower allpass filter
in32 = (int32_t)(*in++) << 10;
in32 = (int32_t)(*in++) * (1 << 10);
diff = in32 - state1;
tmp1 = MUL_ACCUM_1(kResampleAllpass1[0], diff, state0);
state0 = in32;

View file

@ -241,7 +241,7 @@ static int16_t GmmProbability(VadInstT* self, int16_t* features,
(int32_t) (log_likelihood_ratio * kSpectrumWeight[channel]);
// Local VAD decision.
if ((log_likelihood_ratio << 2) > individualTest) {
if ((log_likelihood_ratio * 4) > individualTest) {
vadflag = 1;
}