From 1b64c4cb63470803bb6fa0300fd2b89a58ee485b Mon Sep 17 00:00:00 2001
From: iceman1001 <iceman@iuse.se>
Date: Fri, 22 Feb 2019 15:23:09 +0100
Subject: [PATCH] fix: overflow was possible since 1000 is type long

---
 client/util_posix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/util_posix.c b/client/util_posix.c
index 7704e9d4b..a45dc48e9 100644
--- a/client/util_posix.c
+++ b/client/util_posix.c
@@ -130,7 +130,7 @@ uint64_t msclock(void) {
 #else
 	struct timespec t;
 	clock_gettime(CLOCK_MONOTONIC, &t);
-	return (t.tv_sec * 1000 + t.tv_nsec / 1000000);
+	return ( 1000 * (uint64_t)t.tv_sec + t.tv_nsec / 1000000);
 #endif
 }