From 5e08606619c0b0e065f1ffa12ce6411f321ed174 Mon Sep 17 00:00:00 2001 From: Rob Percival Date: Wed, 14 Sep 2016 20:25:01 +0100 Subject: [PATCH] Cast time_t to uint64_t before converting to milliseconds in ct_policy.c Reviewed-by: Viktor Dukhovni Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/1554) --- crypto/ct/ct_policy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crypto/ct/ct_policy.c b/crypto/ct/ct_policy.c index adee331366..0f27443971 100644 --- a/crypto/ct/ct_policy.c +++ b/crypto/ct/ct_policy.c @@ -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; } -- 2.25.1