From 96bbdd585eb2ddd9fa11da01b46ae71d7be1672a Mon Sep 17 00:00:00 2001 From: kwiberg Date: Thu, 18 Aug 2016 03:17:02 -0700 Subject: [PATCH] WebRtcSpl_SynthesisQMF: Fix UBSan fuzzer bug (left shift of negative value) BUG=chromium:614033 Review-Url: https://codereview.webrtc.org/2253943002 Cr-Commit-Position: refs/heads/master@{#13814} --- webrtc/common_audio/signal_processing/splitting_filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webrtc/common_audio/signal_processing/splitting_filter.c b/webrtc/common_audio/signal_processing/splitting_filter.c index 36fcf355ec..ba6e77dc6f 100644 --- a/webrtc/common_audio/signal_processing/splitting_filter.c +++ b/webrtc/common_audio/signal_processing/splitting_filter.c @@ -182,9 +182,9 @@ void WebRtcSpl_SynthesisQMF(const int16_t* low_band, const int16_t* high_band, for (i = 0; i < band_length; i++) { tmp = (int32_t)low_band[i] + (int32_t)high_band[i]; - half_in1[i] = WEBRTC_SPL_LSHIFT_W32(tmp, 10); + half_in1[i] = tmp * (1 << 10); tmp = (int32_t)low_band[i] - (int32_t)high_band[i]; - half_in2[i] = WEBRTC_SPL_LSHIFT_W32(tmp, 10); + half_in2[i] = tmp * (1 << 10); } // all-pass filter the sum and difference channels