diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-10-23 18:01:11 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-10-09 22:02:20 +0200 |
commit | 8715db6e6d210b7e90b3551b3a1f7783b2ef7dfb (patch) | |
tree | a02da36b5221d6e471fe22411112fc7dbd1a648f | |
parent | c9138413c992dac508436707c59922afbf54e100 (diff) | |
download | ffmpeg-8715db6e6d210b7e90b3551b3a1f7783b2ef7dfb.tar.gz |
uavformat/rsd: check for EOF in extradata
Fixes: OOM
Fixes: 26503/clusterfuzz-testcase-minimized-ffmpeg_dem_RSD_fuzzer-6530816735444992
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 7186ec88b98bc589f1403985ab10cc7f77461ec8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/rsd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rsd.c b/libavformat/rsd.c index 5a56e72bb3..e655d9287e 100644 --- a/libavformat/rsd.c +++ b/libavformat/rsd.c @@ -142,6 +142,8 @@ static int rsd_read_header(AVFormatContext *s) return ret; for (i = 0; i < par->channels; i++) { + if (avio_feof(pb)) + return AVERROR_EOF; avio_read(s->pb, st->codecpar->extradata + 32 * i, 32); avio_skip(s->pb, 8); } |