aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-09-30 00:05:53 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-11-06 19:49:11 +0100
commit635256a324f4644bbfa2f4332e950a183f82c4c9 (patch)
tree9ac02171cf60aceb9794e84b6e81280a413a5f60
parent240546a185931426d241662dbd109f02d64e4107 (diff)
downloadffmpeg-635256a324f4644bbfa2f4332e950a183f82c4c9.tar.gz
Fix out of bound writes in fix_bitshift() of the shorten decoder.
The data pointers s->decoded[*] already take into account s->nwrap. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit f42b3195d3f2692a4dfc0a8668bb4ac35301f2ed) (cherry picked from commit 107ea3057eb8de8a38c45c2f7181c42ea694b187) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/shorten.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 053f5c2ed1..f8d2ff97fe 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -147,7 +147,7 @@ static void fix_bitshift(ShortenContext *s, int32_t *buffer)
if (s->bitshift != 0)
for (i = 0; i < s->blocksize; i++)
- buffer[s->nwrap + i] <<= s->bitshift;
+ buffer[i] <<= s->bitshift;
}