avformat/vividas: Use equals check with n in read_sb_block()
Fixes: OOM
Fixes: 27780/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5097985075314688
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e44214a824
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -267,7 +267,7 @@ static uint8_t *read_sb_block(AVIOContext *src, unsigned *size,
|
||||
*size = n;
|
||||
n -= 8;
|
||||
|
||||
if (avio_read(src, buf+8, n) < n) {
|
||||
if (avio_read(src, buf+8, n) != n) {
|
||||
av_free(buf);
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user