aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-02-15 21:29:11 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-06 14:41:41 +0200
commita64e178277e2d480ffa0353b04c94342e470fb6c (patch)
tree678a712202f7d70c1a97a83ad73c8ea7dfa03990
parentf6fdd11125c9d51293d5e40871abe96d9ba7b30f (diff)
downloadffmpeg-a64e178277e2d480ffa0353b04c94342e470fb6c.tar.gz
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 e44214a8242bc12fa2c86fcc8b0abd2053f1c8f9) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/vividas.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/vividas.c b/libavformat/vividas.c
index 396612d4a2..867009d247 100644
--- a/libavformat/vividas.c
+++ b/libavformat/vividas.c
@@ -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;
}