diracdec: allocate enough space for blocks
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 11 Nov 2012 02:35:10 +0000 (03:35 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 11 Nov 2012 03:01:39 +0000 (04:01 +0100)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/diracdec.c

index a8f5938..3d42a9d 100644 (file)
@@ -346,7 +346,7 @@ static int alloc_sequence_buffers(DiracContext *s)
 
     /* fixme: allocate using real stride here */
     s->sbsplit  = av_malloc(sbwidth * sbheight);
-    s->blmotion = av_malloc(sbwidth * sbheight * 4 * sizeof(*s->blmotion));
+    s->blmotion = av_malloc(sbwidth * sbheight * 16 * sizeof(*s->blmotion));
     s->edge_emu_buffer_base = av_malloc((w+64)*MAX_BLOCKSIZE);
 
     s->mctmp     = av_malloc((w+64+MAX_BLOCKSIZE) * (h*MAX_BLOCKSIZE) * sizeof(*s->mctmp));