shorten: Fix out of bound writes in fix_bitshift()
[ffmpeg.git] / libavcodec / shorten.c
index 8f7436e0a907315f9a27bacbb98070f64f77c4ca..22c5c0a152edb2b2fd0d9c1b589507fb441d5090 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;
 }