summaryrefslogtreecommitdiff
path: root/src/or/torcert.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-07-28 10:31:12 -0400
committerNick Mathewson <nickm@torproject.org>2017-07-28 10:33:51 -0400
commit769a94d9ce570b9418ab8705dc95c99f9b8c2251 (patch)
tree8f1b322775857a7cec2953bcf2ec7e5b6a94a385 /src/or/torcert.c
parentaccb734c5fc45481231b837cae1244129144df06 (diff)
downloadtor-769a94d9ce570b9418ab8705dc95c99f9b8c2251.tar.gz
tor-769a94d9ce570b9418ab8705dc95c99f9b8c2251.zip
Bug 23055: cast, then multiply when doing u32*u32->u64.
No backport, since this bug won't trigger until people make certificates expiring after the Y2106 deadline. CID 1415728
Diffstat (limited to 'src/or/torcert.c')
-rw-r--r--src/or/torcert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/torcert.c b/src/or/torcert.c
index 658e620ca5..69b157446a 100644
--- a/src/or/torcert.c
+++ b/src/or/torcert.c
@@ -393,7 +393,7 @@ rsa_ed25519_crosscert_check(const uint8_t *crosscert,
}
const uint32_t expiration_date = rsa_ed_crosscert_get_expiration(cc);
- const uint64_t expiration_time = expiration_date * 3600;
+ const uint64_t expiration_time = ((uint64_t)expiration_date) * 3600;
if (reject_if_expired_before < 0 ||
expiration_time < (uint64_t)reject_if_expired_before) {