From: Douglas Bagnall Date: Fri, 23 Oct 2020 03:30:25 +0000 (+1300) Subject: dsdb/mod/operational: correct comment arithmetic X-Git-Tag: talloc-2.3.2~79 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6a9d22f4a91e07b8af0f1fb3a7d0cbab2ca0c76f;p=thirdparty%2Fsamba.git dsdb/mod/operational: correct comment arithmetic E + F is not 1F! E + F is 1D! Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- 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) {