aboutsummaryrefslogtreecommitdiffstats
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-07-08 23:37:51 +0200
commitaa3ec219e1a5cc0e96ddec6ea83312ec780448f5 (patch)
treeeeef16f52da5b8e6ce16ac4ae323d4fd1253dd09
parenta9f108bd78e842a47ade2f7c8b22a1764d01d4e6 (diff)
downloadffmpeg-aa3ec219e1a5cc0e96ddec6ea83312ec780448f5.tar.gz
imc: add required padding for GetBitContext buffer
Fixes stack buffer overflow errors detected by address sanitizer in fate-imc. CC: libav-stable@libav.org
-rw-r--r--libavcodec/imc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index 500f56408d..26fbcd4195 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");