]> git.sesse.net Git - vlc/commitdiff
mtime: fix signed integer overflow
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 25 Aug 2014 15:58:43 +0000 (18:58 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 25 Aug 2014 15:58:55 +0000 (18:58 +0300)
src/misc/mtime.c

index 62409edd6b944bc7beb359c5b96f2c9c73e41845..46939dc9bc159c2e8d0a02d962cd04e36fe61372 100644 (file)
@@ -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;
 }