Commit eac16145 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/ffv1dec: Check that there is enough space for the CRC in the global header

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1376084d
......@@ -594,7 +594,7 @@ static int read_extra_header(FFV1Context *f)
unsigned v;
v = av_crc(av_crc_get_table(AV_CRC_32_IEEE), 0,
f->avctx->extradata, f->avctx->extradata_size);
if (v) {
if (v || f->avctx->extradata_size < 4) {
av_log(f->avctx, AV_LOG_ERROR, "CRC mismatch %X!\n", v);
return AVERROR_INVALIDDATA;
}
......
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