summaryrefslogtreecommitdiffstats
path: root/libass
diff options
context:
space:
mode:
authorOleg Oshmyan <chortos@inbox.lv>2017-02-03 21:40:19 +0200
committerOleg Oshmyan <chortos@inbox.lv>2017-02-14 19:43:04 +0200
commit658ba4dac028e1f066da48b1476893ad05af6916 (patch)
treefd5b414ca2cddaaa219a2f25282e8c62c3ac469b /libass
parent14586a1b2f3ae784ee2f29957b4d01207cc6c2a0 (diff)
downloadlibass-658ba4dac028e1f066da48b1476893ad05af6916.tar.bz2
libass-658ba4dac028e1f066da48b1476893ad05af6916.tar.xz
string2timecode: don't truncate milliseconds to int
Commit 8c8741fe2000d4b4d89a53f894363a42288cec3e attempted to fix this expression and make it use the full range of long long, but it missed the millisecond term. This fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=522. The entire timestamp can still overflow long long though.
Diffstat (limited to 'libass')
-rw-r--r--libass/ass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libass/ass.c b/libass/ass.c
index c35f4ae..93376d2 100644
--- a/libass/ass.c
+++ b/libass/ass.c
@@ -232,7 +232,7 @@ static long long string2timecode(ASS_Library *library, char *p)
ass_msg(library, MSGL_WARN, "Bad timestamp");
return 0;
}
- tm = ((h * 60LL + m) * 60 + s) * 1000 + ms * 10;
+ tm = ((h * 60LL + m) * 60 + s) * 1000 + ms * 10LL;
return tm;
}