Fix UBSan errors (left shift of negative value)

BUG=chromium:601787

Review-Url: https://codereview.webrtc.org/2000403006
Cr-Commit-Position: refs/heads/master@{#12911}
This commit is contained in:
kwiberg
2016-05-26 03:40:51 -07:00
committed by Commit bot
parent 52a0bb422c
commit 4f6c2b6eff
2 changed files with 2 additions and 2 deletions

View File

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