You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
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 <michael@niedermayer.cc>
This commit is contained in:
@@ -127,8 +127,7 @@ static int mcc_read_header(AVFormatContext *s)
|
|||||||
num = strtol(rate_str, &df, 10);
|
num = strtol(rate_str, &df, 10);
|
||||||
den = 1;
|
den = 1;
|
||||||
if (df && !av_strncasecmp(df, "DF", 2)) {
|
if (df && !av_strncasecmp(df, "DF", 2)) {
|
||||||
num *= 1000;
|
av_reduce(&num, &den, num * 1000LL, 1001, INT_MAX);
|
||||||
den = 1001;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user