aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-06-06 23:20:49 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-06-14 21:36:39 +0200
commit2a0f23b9d647ad84e0351b43ca4b552add00c8dc (patch)
tree25b70e3ae8beee27ab62b4835dc0259a031a04fb /libavformat
parentaa003019ab9ec5ef7e7b3ff9d6262d3472b427eb (diff)
downloadffmpeg-2a0f23b9d647ad84e0351b43ca4b552add00c8dc.tar.gz
avformat/sbgdec: Fixes integer overflow in str_to_time() with hours
Fixes: signed integer overflow: 904444 * 3600 cannot be represented in type 'int' Fixes: 15113/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5764083346833408 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/sbgdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/sbgdec.c b/libavformat/sbgdec.c
index 67ae39698e..4155395da0 100644
--- a/libavformat/sbgdec.c
+++ b/libavformat/sbgdec.c
@@ -197,7 +197,7 @@ static int str_to_time(const char *str, int64_t *rtime)
if (end > cur + 1)
cur = end;
}
- *rtime = (hours * 3600 + minutes * 60 + seconds) * AV_TIME_BASE;
+ *rtime = (hours * 3600LL + minutes * 60LL + seconds) * AV_TIME_BASE;
return cur - str;
}