Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-09-17 23:55:24 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-09-25 14:52:00 +0300
commit25178bcd73890650f85e68a18807f95229968004 (patch)
treee3b0a162ffa07a149ef6392bf31da7577783683e
parentd15dfed7acd3c64d44b69992332391f714c2a161 (diff)
avformat/jacosubdec: Fix overflow in get_shift()
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_JACOSUB_fuzzer-6722544461283328 Fixes: signed integer overflow: 48214448 * 60 cannot be represented in type 'int' 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 b1a68127bbcd3d638363fa0249982c494e87c9e2) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/jacosubdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c
index 2ccbf4c9de..59544bb507 100644
--- a/libavformat/jacosubdec.c
+++ b/libavformat/jacosubdec.c
@@ -152,7 +152,7 @@ static int get_shift(int timeres, const char *buf)
ret = 0;
switch (n) {
case 4:
- ret = sign * (((int64_t)a*3600 + b*60 + c) * timeres + d);
+ ret = sign * (((int64_t)a*3600 + (int64_t)b*60 + c) * timeres + d);
break;
case 3:
ret = sign * (( (int64_t)a*60 + b) * timeres + c);