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

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

Issue 2144733007: Check for out-of-bounds access on |kIntrpCoef|. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@52
Patch Set: Created 4 years, 5 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/isac/fix/source/pitch_filter.c
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c
index 13c3899c67e991769c038c890b2e8c8a2cf708ba..a8c491c6710f001e0953ab78e9847b4e79b8562e 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/pitch_filter.c
@@ -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];
« 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