[FFmpeg-cvslog] avformat/rpl: Use 64bit for duration computation

Michael Niedermayer git at videolan.org
Fri Nov 4 12:05:06 EET 2022


ffmpeg | branch: release/5.0 | Michael Niedermayer <michael at niedermayer.cc> | Sun Sep 18 16:49:26 2022 +0200| [109a9f366b629ad60e808b86f061a62086face6e] | committer: Michael Niedermayer

avformat/rpl: Use 64bit for duration computation

Fixes: signed integer overflow: 24709512 * 88 cannot be represented in type 'int'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6737973728641024

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 529f64b2eb98e0c3ae4944abd5d01fa7c1def047)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=109a9f366b629ad60e808b86f061a62086face6e
---

 libavformat/rpl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rpl.c b/libavformat/rpl.c
index 459791ffd3..75aed739a0 100644
--- a/libavformat/rpl.c
+++ b/libavformat/rpl.c
@@ -277,7 +277,7 @@ static int rpl_read_header(AVFormatContext *s)
     error |= read_line(pb, line, sizeof(line));  // size of "helpful" sprite
     if (vst) {
         error |= read_line(pb, line, sizeof(line));  // offset to key frame list
-        vst->duration = number_of_chunks * rpl->frames_per_chunk;
+        vst->duration = number_of_chunks * (int64_t)rpl->frames_per_chunk;
     }
 
     // Read the index



More information about the ffmpeg-cvslog mailing list