mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
indeo3: check per-plane data buffer against input buffer bounds.
Fixes : http://bugzilla.libav.org/show_bug.cgi?id=102 Signed-off-by: Alex Converse <alex.converse@gmail.com>
This commit is contained in:
parent
fdab793a46
commit
464ccb0144
@ -804,8 +804,10 @@ static int decode_plane(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
|
|||||||
num_vectors = bytestream_get_le32(&data);
|
num_vectors = bytestream_get_le32(&data);
|
||||||
ctx->mc_vectors = num_vectors ? data : 0;
|
ctx->mc_vectors = num_vectors ? data : 0;
|
||||||
|
|
||||||
|
if (num_vectors * 2 >= data_size)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
/* init the bitreader */
|
/* init the bitreader */
|
||||||
init_get_bits(&ctx->gb, &data[num_vectors * 2], data_size << 3);
|
init_get_bits(&ctx->gb, &data[num_vectors * 2], (data_size - num_vectors * 2) << 3);
|
||||||
ctx->skip_bits = 0;
|
ctx->skip_bits = 0;
|
||||||
ctx->need_resync = 0;
|
ctx->need_resync = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user