commit | 9f789a4500bea5fde357227f20fa7554a2241880 | [log] [tgz] |
---|---|---|
author | Alex Loiko <aleloi@webrtc.org> | Wed Jun 28 13:07:23 2017 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Jun 28 14:55:20 2017 |
tree | 5dd6463e1509a5604ef9cd5ffebc6f59243c80af | |
parent | d6e9466e7ef8736c5dd4c736c9732506b1b70c1e [diff] |
LowCutFilter::BiqueadFilter::Process: Fix UBSan fuzzer bug (left shift of negative value) Bug: chromium:735593 Change-Id: I9f1165370d850456480fbb22ce2434bf933a420b Reviewed-on: https://chromium-review.googlesource.com/552136 Commit-Queue: Alex Loiko <aleloi@google.com> Reviewed-by: Per Ã…hgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#18812}
diff --git a/webrtc/modules/audio_processing/low_cut_filter.cc b/webrtc/modules/audio_processing/low_cut_filter.cc index 1827374..ea45532 100644 --- a/webrtc/modules/audio_processing/low_cut_filter.cc +++ b/webrtc/modules/audio_processing/low_cut_filter.cc
@@ -59,7 +59,7 @@ y[3] = y[1]; y[0] = static_cast<int16_t>(tmp_int32 >> 13); y[1] = static_cast<int16_t>( - (tmp_int32 - (static_cast<int32_t>(y[0]) << 13)) << 2); + (tmp_int32 - (static_cast<int32_t>(y[0]) * ( 1 << 13))) * 4); // Rounding in Q12, i.e. add 2^11. tmp_int32 += 2048;