[FFmpeg-cvslog] shorten: Fix out of bound writes in fix_bitshift()

Laurent Aimar git at videolan.org
Sat Oct 8 03:47:31 CEST 2011


ffmpeg | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Sep 30 01:26:22 2011 +0000| [5f05cf4ea9aaafed8edcabe785c2719786103ec1] | committer: Janne Grunau

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>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5f05cf4ea9aaafed8edcabe785c2719786103ec1
---

 libavcodec/shorten.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 8f7436e..22c5c0a 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -155,7 +155,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