From: Joseph Sutton Date: Mon, 30 Oct 2023 22:33:39 +0000 (+1300) Subject: s3:utils: Align integer type X-Git-Tag: talloc-2.4.2~878 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=55d06fa9e328897548455f757da1452138336016;p=thirdparty%2Fsamba.git s3:utils: Align integer type If ‘count’ is larger than INT_MAX, ‘i’ might overflow in the loop and lead to undefined behaviour. See also CID 1548342. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source3/rpc_client/wsp_cli.c b/source3/rpc_client/wsp_cli.c index 91e5ebb3b55..34eb1bc2696 100644 --- a/source3/rpc_client/wsp_cli.c +++ b/source3/rpc_client/wsp_cli.c @@ -981,7 +981,7 @@ static enum ndr_err_code extract_variant_addresses(TALLOC_CTX *ctx, vec_address[0] = addr; } else { uint64_t array_addr = addr; - int i; + uint64_t i; for (i = 0; i < count; i++) { if (is_64bit) { vec_address[i] =