Commit 17603094 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/rasc: Check input size in decode_fint()

Fixes: Timeout (11sec -> 42ms)
Fixes: 18287/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5637866331308032

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent df498cf5
......@@ -124,6 +124,8 @@ static int decode_fint(AVCodecContext *avctx,
clear_plane(avctx, s->frame1);
return 0;
}
if (bytestream2_get_bytes_left(gb) < 72)
return AVERROR_INVALIDDATA;
bytestream2_skip(gb, 8);
w = bytestream2_get_le32(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