Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: webrtc/modules/audio_coding/codecs/ilbc/smooth.c

Issue 2258543002: WebRtcIlbcfix_Smooth: Fix UBSan fuzzer bug (left shift of 1 by 31 overflows) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/codecs/ilbc/smooth.c
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/smooth.c b/webrtc/modules/audio_coding/codecs/ilbc/smooth.c
index 269331cce4d4b7d00f4daccc0c9819ee6afd5c97..ed879327c096c941340956dff039c0db5780f4b5 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/smooth.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/smooth.c
@@ -168,7 +168,7 @@ void WebRtcIlbcfix_Smooth(
/* B_W32 is in Q30 ( B = 1 - ENH_A0/2 - A * w10/w00 ) */
scale1 = 31-bitsw10;
scale2 = 21-scale1;
- w10prim = w10 * (1 << scale1);
+ w10prim = w10 == 0 ? 0 : w10 * (1 << scale1);
w00prim = WEBRTC_SPL_SHIFT_W32(w00, -scale2);
scale = bitsw00-scale2-15;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698