[vlc-commits] mtime: fix signed integer overflow
Rémi Denis-Courmont
git at videolan.org
Mon Aug 25 17:59:16 CEST 2014
vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 25 18:58:43 2014 +0300| [62d20718ddaacb96845a0c92adabd4e8b5b88b36] | committer: Rémi Denis-Courmont
mtime: fix signed integer overflow
(cherry picked from commit 45f7b6b3600f41a54daf53e203a237eb3001896d)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=62d20718ddaacb96845a0c92adabd4e8b5b88b36
---
src/misc/mtime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/misc/mtime.c b/src/misc/mtime.c
index 62409ed..46939dc 100644
--- a/src/misc/mtime.c
+++ b/src/misc/mtime.c
@@ -258,7 +258,7 @@ uint64_t NTPtime64 (void)
* No leap seconds during that period since they were not invented yet.
*/
assert (t < 0x100000000);
- t |= ((70LL * 365 + 17) * 24 * 60 * 60 + ts.tv_sec) << 32;
+ t |= ((UINT64_C(70) * 365 + 17) * 24 * 60 * 60 + ts.tv_sec) << 32;
return t;
}
More information about the vlc-commits
mailing list