mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 01:02:33 +00:00
avformat/rpl: Check the number of streams
Fixes: out of memory access Fixes: 27787/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-4743666463408128.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
b1bced5433
commit
0677bdb1f5
@ -253,6 +253,9 @@ static int rpl_read_header(AVFormatContext *s)
|
|||||||
error |= read_line(pb, line, sizeof(line));
|
error |= read_line(pb, line, sizeof(line));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (s->nb_streams == 0)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
rpl->frames_per_chunk = read_line_and_int(pb, &error); // video frames per chunk
|
rpl->frames_per_chunk = read_line_and_int(pb, &error); // video frames per chunk
|
||||||
if (vst && rpl->frames_per_chunk > 1 && vst->codecpar->codec_tag != 124)
|
if (vst && rpl->frames_per_chunk > 1 && vst->codecpar->codec_tag != 124)
|
||||||
av_log(s, AV_LOG_WARNING,
|
av_log(s, AV_LOG_WARNING,
|
||||||
|
Loading…
Reference in New Issue
Block a user