Commit bcf9d2a1 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/wmv2dec: Check that the P frame secondary header fit in the input

Fixes: Timeout (64sec ->2 sec)
Fixes: 14131/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV2_fuzzer-5719879556005888

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 110dce96
......@@ -230,6 +230,9 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext *s)
s->rl_chroma_table_index = s->rl_table_index;
}
if (get_bits_left(&s->gb) < 2)
return AVERROR_INVALIDDATA;
s->dc_table_index = get_bits1(&s->gb);
s->mv_table_index = get_bits1(&s->gb);
......
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