mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/vividas: Check buffer size before allocation
Fixes: out of array access Fixes: 15365/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5716153105645568 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
8e41675e18
commit
c3ef24d9ba
@ -251,6 +251,9 @@ static uint8_t *read_sb_block(AVIOContext *src, unsigned *size,
|
||||
*key = tmpkey;
|
||||
}
|
||||
|
||||
if (n < 8)
|
||||
return NULL;
|
||||
|
||||
buf = av_malloc(n);
|
||||
if (!buf)
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user