Commit 52ba824c authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/rasc: Check input space before reading chunk

Fixes: Timeout
Fixes: 11118/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RASC_fuzzer-5652564066959360

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 6bfc9352
......@@ -680,6 +680,9 @@ static int decode_frame(AVCodecContext *avctx,
while (bytestream2_get_bytes_left(gb) > 0) {
unsigned type, size = 0;
if (bytestream2_get_bytes_left(gb) < 8)
return AVERROR_INVALIDDATA;
type = bytestream2_get_le32(gb);
if (type == KBND || type == BNDL) {
intra = type == KBND;
......
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