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

Unified Diff: webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c

Issue 1989803002: 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
Index: webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c
index 22224a80711ce371afba5075adb24f064310bfb5..2e9d0664ef572d080101b16f8ec3af1ca9a54c28 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c
@@ -274,7 +274,7 @@ void WebRtcIsacfix_NormLatticeFilterAr(size_t orderCoef,
for (i=0;i<HALF_SUBFRAMELEN;i++)
{
- tmp32 = lat_inQ25[i + temp1] << 1; // Q25->Q26
+ tmp32 = lat_inQ25[i + temp1] * (1 << 1); // Q25->Q26
tmp32 = WEBRTC_SPL_MUL_16_32_RSFT16(inv_gain16, tmp32); //lat_in[]*inv_gain in (Q(18-sh)*Q26)>>16 = Q(28-sh)
tmp32 = WEBRTC_SPL_SHIFT_W32(tmp32, -(28-sh)); // lat_in[]*inv_gain in Q0

Powered by Google App Engine
This is Rietveld 408576698