Browse Source

imc: add required padding for GetBitContext buffer

Fixes stack buffer overflow errors detected by address sanitizer in
fate-imc.

CC: libav-stable@libav.org
tags/n2.4.11
Janne Grunau 10 years ago
parent
commit
aa3ec219e1
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/imc.c

+ 1
- 1
libavcodec/imc.c View File

@@ -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");


Loading…
Cancel
Save