[FFmpeg-cvslog] avformat/mccdec: Fix overflows in num/den
ffmpeg | branch: release/4.4 | Michael Niedermayer | Sat Apr 24 16:37:34 2021 +0200| [612472c64796d67a2a689e6d34d82dbe9cc494d6] | committer: Michael Niedermayer avformat/mccdec: Fix overflows in num/den Fixes: signed integer overflow: 6365816 * 1000 cannot be represented in type 'int' Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_MCC_fuzzer-6737934184218624 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer (cherry picked from commit ff05326081922059314b8927cf9bbc9c7e73458f) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=612472c64796d67a2a689e6d34d82dbe9cc494d6 --- libavformat/mccdec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/mccdec.c b/libavformat/mccdec.c index 2a0b7905a0..627471a1fe 100644 --- a/libavformat/mccdec.c +++ b/libavformat/mccdec.c @@ -127,8 +127,7 @@ static int mcc_read_header(AVFormatContext *s) num = strtol(rate_str, , 10); den = 1; if (df && !av_strncasecmp(df, "DF", 2)) { -num *= 1000; -den = 1001; +av_reduce(, , num * 1000LL, 1001, INT_MAX); } } ___ 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".
[FFmpeg-cvslog] avformat/mccdec: Fix overflows in num/den
ffmpeg | branch: master | Michael Niedermayer | Sat Apr 24 16:37:34 2021 +0200| [ff05326081922059314b8927cf9bbc9c7e73458f] | committer: Michael Niedermayer avformat/mccdec: Fix overflows in num/den Fixes: signed integer overflow: 6365816 * 1000 cannot be represented in type 'int' Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_MCC_fuzzer-6737934184218624 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ff05326081922059314b8927cf9bbc9c7e73458f --- libavformat/mccdec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/mccdec.c b/libavformat/mccdec.c index a096ac6e93..10ed7c0dc1 100644 --- a/libavformat/mccdec.c +++ b/libavformat/mccdec.c @@ -127,8 +127,7 @@ static int mcc_read_header(AVFormatContext *s) num = strtol(rate_str, , 10); den = 1; if (df && !av_strncasecmp(df, "DF", 2)) { -num *= 1000; -den = 1001; +av_reduce(, , num * 1000LL, 1001, INT_MAX); } } ___ 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".