From: Rob Percival Date: Wed, 14 Sep 2016 19:25:01 +0000 (+0100) Subject: Cast time_t to uint64_t before converting to milliseconds in ct_policy.c X-Git-Tag: OpenSSL_1_1_1-pre1~3058 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5e08606619c0b0e065f1ffa12ce6411f321ed174;p=oweals%2Fopenssl.git 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) --- 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; }