Commit d8716e3d authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/vividas: check length in read_vblock()

Fixes: out of array access
Fixes: 15166/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5731062396747776

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 07ffe94c
......@@ -205,7 +205,7 @@ static uint8_t *read_vblock(AVIOContext *src, uint32_t *size,
decode_block(tmp, tmp, 4, key, k2, align);
n = get_v(tmp);
if (!n)
if (n < 4)
return NULL;
buf = av_malloc(n);
......
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