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

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

Issue 2000403006: Fix UBSan errors (left shift of negative value) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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 | webrtc/modules/audio_coding/codecs/ilbc/smooth.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c b/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c
index 1c0fd42383721f544b24c7a4978483cfd254e6dd..61b9d2606a3f1132917ec301a23c52cd41858f76 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c
@@ -152,7 +152,7 @@ size_t WebRtcIlbcfix_EnhancerInterface( /* (o) Estimated lag in end of in[] */
corr16[i] = (int16_t)WEBRTC_SPL_SHIFT_W32(corrmax[i], corrSh);
corr16[i] = (int16_t)((corr16[i] * corr16[i]) >> 16);
en16[i] = (int16_t)WEBRTC_SPL_SHIFT_W32(ener, enerSh);
- totsh[i] = enerSh - (corrSh << 1);
+ totsh[i] = enerSh - 2 * corrSh;
}
/* Compare lagmax[0..3] for the (corr^2)/ener criteria */
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/codecs/ilbc/smooth.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698