ffmpeg | branch: release/7.1 | Michael Niedermayer <mich...@niedermayer.cc> | Sun Nov 3 20:08:07 2024 +0100| [241e87afa4c5bd70c3f360afa7425623d4d2218f] | committer: Michael Niedermayer
avformat/rpl: check channels Fixes: 42537199/clusterfuzz-testcase-minimized-fuzzer_loadfile_direct-5447162658357248 Fixes: runtime error: signed integer overflow: -3330498059201358222 * 4 cannot be represented in type 'int64_t' (aka 'long') Found-by: ossfuzz Reported-by: Kacper Michajlow Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> (cherry picked from commit beca13a42e9fb5341e8bd6356fd7d9c2d18aac9b) Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=241e87afa4c5bd70c3f360afa7425623d4d2218f --- libavformat/rpl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/rpl.c b/libavformat/rpl.c index 32a762b60a..e971d0588f 100644 --- a/libavformat/rpl.c +++ b/libavformat/rpl.c @@ -205,6 +205,8 @@ static int rpl_read_header(AVFormatContext *s) if (ast->codecpar->sample_rate < 0) return AVERROR_INVALIDDATA; channels = read_line_and_int(pb, &error); // number of audio channels + if (channels <= 0) + return AVERROR_INVALIDDATA; error |= read_line(pb, line, sizeof(line)); ast->codecpar->bits_per_coded_sample = read_int(line, &endptr, &error); // audio bits per sample av_strlcpy(audio_type, endptr, RPL_LINE_LENGTH); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".