Check for out-of-bounds access on |kIntrpCoef|.

BUG=chromium:600953

Review-Url: https://codereview.webrtc.org/2025493002
Cr-Commit-Position: refs/heads/master@{#13039}
This commit is contained in:
mbarbella
2016-06-03 10:05:58 -07:00
committed by Commit bot
parent 647998cccf
commit 7bf939c720

View File

@ -118,7 +118,7 @@ void WebRtcIsacfix_PitchFilter(int16_t* indatQQ, // Q10 if type is 1 or 4,
}
frcQQ = ((indW32 << 7) + 64 - curLagQ7) >> 4;
if (frcQQ == PITCH_FRACS) {
if (frcQQ >= PITCH_FRACS) {
frcQQ = 0;
}
fracoeffQQ = kIntrpCoef[frcQQ];
@ -191,7 +191,7 @@ void WebRtcIsacfix_PitchFilterGains(const int16_t* indatQ0,
indW16 = CalcLrIntQ(curLagQ7, 7);
frcQQ = ((indW16 << 7) + 64 - curLagQ7) >> 4;
if (frcQQ == PITCH_FRACS) {
if (frcQQ >= PITCH_FRACS) {
frcQQ = 0;
}
fracoeffQQ = kIntrpCoef[frcQQ];