From 6a9d22f4a91e07b8af0f1fb3a7d0cbab2ca0c76f Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Fri, 23 Oct 2020 16:30:25 +1300 Subject: [PATCH] dsdb/mod/operational: correct comment arithmetic E + F is not 1F! E + F is 1D! Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- source4/dsdb/samdb/ldb_modules/operational.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c index 50e913cdd5c..3c0bd039d56 100644 --- a/source4/dsdb/samdb/ldb_modules/operational.c +++ b/source4/dsdb/samdb/ldb_modules/operational.c @@ -797,7 +797,10 @@ static NTTIME get_msds_user_password_expiry_time_computed(struct ldb_module *mod * * 0x7FFFFFFFFFFFFFFEULL + 0x7FFFFFFFFFFFFFFFULL * = - * 0xFFFFFFFFFFFFFFFFULL + * 0xFFFFFFFFFFFFFFFDULL + * + * or to put it another way, adding two numbers less than 1<<63 can't + * ever be more than 1<<64, therefore this result can't wrap. */ ret = (NTTIME)pwdLastSet - (NTTIME)maxPwdAge; if (ret >= 0x7FFFFFFFFFFFFFFFULL) { -- 2.47.3