[vlc-commits] mtime: fix signed integer overflow
Rémi Denis-Courmont
git at videolan.org
Mon Aug 25 17:58:59 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 25 18:58:43 2014 +0300| [45f7b6b3600f41a54daf53e203a237eb3001896d] | committer: Rémi Denis-Courmont
mtime: fix signed integer overflow
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=45f7b6b3600f41a54daf53e203a237eb3001896d
---
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