From 55d06fa9e328897548455f757da1452138336016 Mon Sep 17 00:00:00 2001 From: Joseph Sutton Date: Tue, 31 Oct 2023 11:33:39 +1300 Subject: [PATCH] s3:utils: Align integer type MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- source3/rpc_client/wsp_cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] = -- 2.47.3