shorten: Fix out of bound writes in fix_bitshift()
authorLaurent Aimar <fenrir@videolan.org>
Fri, 30 Sep 2011 01:26:22 +0000 (01:26 +0000)
committerJanne Grunau <janne-libav@jannau.net>
Fri, 7 Oct 2011 14:25:31 +0000 (16:25 +0200)
The data pointers s->decoded[*] already take into account s->nwrap.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
libavcodec/shorten.c

index 8f7436e..22c5c0a 100644 (file)
@@ -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;
 }