[FFmpeg-cvslog] avcodec/imc: Fix bitstream buffer padding

Michael Niedermayer git at videolan.org
Sat Aug 23 01:45:08 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Aug 23 01:34:28 2014 +0200| [7444cf9a9c0b8b2bba8198af2823521c654a48f4] | committer: Michael Niedermayer

avcodec/imc: Fix bitstream buffer padding

Fixes buffer overread

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7444cf9a9c0b8b2bba8198af2823521c654a48f4
---

 libavcodec/imc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index 0df0dd1..2a5eac9 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -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");



More information about the ffmpeg-cvslog mailing list