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}
This commit is contained in:
kwiberg 2016-08-18 03:17:02 -07:00 committed by Commit bot
parent e9a6acfbf5
commit 96bbdd585e

View File

@ -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