Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-11-15 03:22:31 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2015-11-15 03:23:25 +0300
commit08b520636e96ba6888b669b9b3f4c414631ea1d2 (patch)
treee2573836c71200d1548491419f69b5b0823da8ab /libavcodec/takdec.c
parent76b6f4b7d91901929177cc61d9810dcca0bb40c1 (diff)
avcodec/takdec: Skip last p2 sample (which is unused)
Fixes out of array read Fixes: cb3f38b08b4541523974667c7d1eee9e/asan_heap-oob_2659e18_9838_021fd5cd635bf76cede6398cd9ecbcdd.tak Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/takdec.c')
-rw-r--r--libavcodec/takdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index dc0449e57d..d057e0a1cb 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -621,7 +621,7 @@ static int decorrelate(TAKDecContext *s, int c1, int c2, int length)
for (; length2 > 0; length2 -= tmp) {
tmp = FFMIN(length2, x);
- for (i = 0; i < tmp; i++)
+ for (i = 0; i < tmp - (tmp == length2); i++)
s->residues[filter_order + i] = *p2++ >> dshift;
for (i = 0; i < tmp; i++) {