summaryrefslogtreecommitdiff
path: root/libavcodec/imc.c
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2015-06-08 14:48:54 +0200
committerJanne Grunau <janne-libav@jannau.net>2015-06-09 10:07:04 +0200
commit210921722bf828b3b895ebcbc34374e6c4452c6f (patch)
treece01093b21f13313ba634e0f0d16b754823190b5 /libavcodec/imc.c
parent09447f2b0fafac6d9565aab82a4c5f16fc99ee5e (diff)
imc: add required padding for GetBitContext buffer
Fixes stack buffer overflow errors detected by address sanitizer in fate-imc. CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec/imc.c')
-rw-r--r--libavcodec/imc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index 411bc85b74..c60fc7abfa 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -997,7 +997,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 + FF_INPUT_BUFFER_PADDING_SIZE) / 2]);
if (buf_size < IMC_BLOCK_SIZE * avctx->channels) {
av_log(avctx, AV_LOG_ERROR, "frame too small!\n");