aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/subviewerdec.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-10-21 01:08:17 +0200
committerClément Bœsch <ubitux@gmail.com>2012-10-21 01:08:17 +0200
commit1ea3c03743ec6a7c33312896de3bbdbe7f60d0f5 (patch)
tree8fb25239248fbfd25996ac04aa38f9623be128eb /libavformat/subviewerdec.c
parent044c0e62eaea07c2649d821dadd4d875d3fb9ec7 (diff)
downloadffmpeg-1ea3c03743ec6a7c33312896de3bbdbe7f60d0f5.tar.gz
lavf/subviewerdec: fix potential timing overflows.
Should fix CID733779 and CID733780.
Diffstat (limited to 'libavformat/subviewerdec.c')
-rw-r--r--libavformat/subviewerdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/subviewerdec.c b/libavformat/subviewerdec.c
index e708a28621..99e40fda79 100644
--- a/libavformat/subviewerdec.c
+++ b/libavformat/subviewerdec.c
@@ -57,8 +57,8 @@ static int read_ts(const char *s, int64_t *start, int *duration)
if (sscanf(s, "%u:%u:%u.%u,%u:%u:%u.%u",
&hh1, &mm1, &ss1, &ms1, &hh2, &mm2, &ss2, &ms2) == 8) {
- end = (hh2*3600 + mm2*60 + ss2) * 100 + ms2;
- *start = (hh1*3600 + mm1*60 + ss1) * 100 + ms1;
+ end = (hh2*3600LL + mm2*60LL + ss2) * 100LL + ms2;
+ *start = (hh1*3600LL + mm1*60LL + ss1) * 100LL + ms1;
*duration = end - *start;
return 0;
}