Browse Source

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 7186ec88b9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.3.2
Michael Niedermayer 5 years ago
parent
commit
7d7ca25b40
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/rsd.c

+ 2
- 0
libavformat/rsd.c View File

@@ -131,6 +131,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);
}


Loading…
Cancel
Save