aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-12-21 18:13:06 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2011-12-21 18:13:06 -0500
commitf264d336fe61c12ce9607c3060aa5d3dca947c61 (patch)
treee30e009b1f264c65664d380568bb5ecc074012ce
parente9dc92012773aab5f51d8d37eb14564988c5f217 (diff)
downloadffmpeg-f264d336fe61c12ce9607c3060aa5d3dca947c61.tar.gz
truespeech: fix invalid reads in truespeech_apply_twopoint_filter()
fixes Bug 171
-rw-r--r--libavcodec/truespeech.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
index 524884ddf5..5ef0a01427 100644
--- a/libavcodec/truespeech.c
+++ b/libavcodec/truespeech.c
@@ -179,6 +179,7 @@ static void truespeech_apply_twopoint_filter(TSContext *dec, int quart)
for(i = 0; i < 146; i++)
tmp[i] = dec->filtbuf[i];
off = (t / 25) + dec->offset1[quart >> 1] + 18;
+ off = av_clip(off, 0, 145);
ptr0 = tmp + 145 - off;
ptr1 = tmp + 146;
filter = (const int16_t*)ts_order2_coeffs + (t % 25) * 2;