Cast time_t to uint64_t before converting to milliseconds in ct_policy.c
[openssl.git] / crypto / ct / ct_policy.c
index adee331366ea5694628f624e9b36506acfb83867..0f274439716cb968e117ccc18df1a485b599bc1d 100644 (file)
@@ -33,7 +33,9 @@ CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new(void)
     }
 
     // time(NULL) shouldn't ever fail, so don't bother checking for -1.
-    ctx->epoch_time_in_ms = (time(NULL) + SCT_CLOCK_DRIFT_TOLERANCE) * 1000;
+    ctx->epoch_time_in_ms = (uint64_t)(time(NULL) + SCT_CLOCK_DRIFT_TOLERANCE) *
+            1000;
+
     return ctx;
 }