diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-20 18:47:44 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-20 19:05:15 +0200 |
commit | dd84efe3c76a5ebf3db254b02870edd193d1a1e7 (patch) | |
tree | 24b7e3d5bfca248714a63e2491ea98d7f01d6093 /libavformat/matroskaenc.c | |
parent | b1f517f503139ab9d0c406228b53663e86a128df (diff) | |
download | ffmpeg-dd84efe3c76a5ebf3db254b02870edd193d1a1e7.tar.gz |
matroskaenc: Fix hypothetical integer overflows
Fixes CID700562-7
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 0d387e7358..bd1344c11f 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1015,8 +1015,8 @@ static int ass_get_duration(const uint8_t *p) if (sscanf(p, "%*[^,],%d:%d:%d%*c%d,%d:%d:%d%*c%d", &sh, &sm, &ss, &sc, &eh, &em, &es, &ec) != 8) return 0; - start = 3600000*sh + 60000*sm + 1000*ss + 10*sc; - end = 3600000*eh + 60000*em + 1000*es + 10*ec; + start = 3600000LL*sh + 60000LL*sm + 1000LL*ss + 10LL*sc; + end = 3600000LL*eh + 60000LL*em + 1000LL*es + 10LL*ec; return end - start; } |