[FFmpeg-cvslog] shorten: Fix out of bound writes in fix_bitshift()
Laurent Aimar
git at videolan.org
Mon Jun 4 12:51:31 CEST 2012
ffmpeg | branch: release/0.6 | Laurent Aimar <fenrir at videolan.org> | Fri Sep 30 01:26:22 2011 +0000| [58b3f439cc7e900fe269a7b73c58cf57a6e0c0fb] | committer: Reinhard Tartler
shorten: Fix out of bound writes in fix_bitshift()
The data pointers s->decoded[*] already take into account s->nwrap.
Signed-off-by: Janne Grunau <janne-libav at jannau.net>
(cherry picked from commit 5f05cf4ea9aaafed8edcabe785c2719786103ec1)
Signed-off-by: Anton Khirnov <anton at khirnov.net>
(cherry picked from commit 737bea21b6c2c1d4dca0b7b18824c0a3205556d2)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=58b3f439cc7e900fe269a7b73c58cf57a6e0c0fb
---
libavcodec/shorten.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 833a817..22fdcff 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -156,7 +156,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;
}
More information about the ffmpeg-cvslog
mailing list