]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/imc: Fix bitstream buffer padding
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 22 Aug 2014 23:34:28 +0000 (01:34 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 22 Aug 2014 23:34:28 +0000 (01:34 +0200)
Fixes buffer overread

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/imc.c

index 0df0dd1a686c6df31820ef08abd798cd8fe14e48..2a5eac9b7ce7b52fb1a26ecc09166e98df736efb 100644 (file)
@@ -1018,7 +1018,7 @@ static int imc_decode_frame(AVCodecContext *avctx, void *data,
 
     IMCContext *q = avctx->priv_data;
 
-    LOCAL_ALIGNED_16(uint16_t, buf16, [IMC_BLOCK_SIZE / 2]);
+    LOCAL_ALIGNED_16(uint16_t, buf16, [IMC_BLOCK_SIZE / 2 + FF_INPUT_BUFFER_PADDING_SIZE/2]);
 
     if (buf_size < IMC_BLOCK_SIZE * avctx->channels) {
         av_log(avctx, AV_LOG_ERROR, "frame too small!\n");