[FFmpeg-devel] [PATCH 8/8] Fix out of bound writes in fix_bitshift() of the shorten decoder.

fenrir at elivagar.org fenrir at elivagar.org
Fri Sep 30 00:05:53 CEST 2011


From: Laurent Aimar <fenrir at videolan.org>

The data pointers s->decoded[*] already take into account s->nwrap.
---
 libavcodec/shorten.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 966584d..b2fcb3a 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;
 }
 
 
-- 
1.7.2.5



More information about the ffmpeg-devel mailing list