Commit e7e1f34f authored by reimar's avatar reimar

Buffer for get_bits must be padded because readers may overread.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7477 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 88e2be66
......@@ -231,7 +231,7 @@ static int mpc7_decode_frame(AVCodecContext * avctx,
av_log(avctx, AV_LOG_ERROR, "Too small buffer passed (%i bytes)\n", buf_size);
}
bits = av_malloc((buf_size - 1) & ~3);
bits = av_malloc(((buf_size - 1) & ~3) + FF_INPUT_BUFFER_PADDING_SIZE);
c->dsp.bswap_buf(bits, buf + 4, (buf_size - 4) >> 2);
init_get_bits(&gb, bits, (buf_size - 4)* 8);
skip_bits(&gb, buf[0]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment