[Ffmpeg-cvslog] r7477 - trunk/libavcodec/mpc.c
reimar
subversion
Sun Jan 14 17:11:10 CET 2007
Author: reimar
Date: Sun Jan 14 17:11:10 2007
New Revision: 7477
Modified:
trunk/libavcodec/mpc.c
Log:
Buffer for get_bits must be padded because readers may overread.
Modified: trunk/libavcodec/mpc.c
==============================================================================
--- trunk/libavcodec/mpc.c (original)
+++ trunk/libavcodec/mpc.c Sun Jan 14 17:11:10 2007
@@ -231,7 +231,7 @@
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]);
More information about the ffmpeg-cvslog
mailing list