aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-09-18 16:49:26 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2022-09-25 13:52:03 +0200
commit8ff4a080bf89f801a2a40f5142513bad44d9b093 (patch)
tree28ad30831bd26473f53ca82d0aafae38063f0bd6
parent98ba25bd11115effa959129cc5cea547a2bb54f5 (diff)
downloadffmpeg-8ff4a080bf89f801a2a40f5142513bad44d9b093.tar.gz
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@niedermayer.cc> (cherry picked from commit 529f64b2eb98e0c3ae4944abd5d01fa7c1def047) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/rpl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rpl.c b/libavformat/rpl.c
index ad3659e936..10cde679f8 100644
--- a/libavformat/rpl.c
+++ b/libavformat/rpl.c
@@ -276,7 +276,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