From 3aa6aa02a84a63c634c33649521ab0423fd59994 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 5 Jul 2024 13:37:30 +0200 Subject: [PATCH] s4:torture: Initialize struct netr_IdentityInfo "Error: UNINIT (CWE-457): samba-4.20.0rc2/source4/torture/rpc/samr.c:3601: var_decl: Declaring variable ""identity"" without initializer. samba-4.20.0rc2/source4/torture/rpc/samr.c:3650: uninit_use: Using uninitialized value ""identity"". Field ""identity.domain_name.length"" is uninitialized. 3648| } 3649| 3650|-> pinfo.identity_info = identity; 3651| logon.password = &pinfo; 3652|" Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner --- source4/torture/rpc/samr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index b7d0b2c72cf..36dd86f6770 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -3598,7 +3598,7 @@ static bool test_SamLogon(struct torture_context *tctx, union netr_LogonLevel logon; union netr_Validation validation; uint8_t authoritative; - struct netr_IdentityInfo identity; + struct netr_IdentityInfo identity = {}; struct netr_NetworkInfo ninfo; struct netr_PasswordInfo pinfo; DATA_BLOB names_blob, chal, lm_resp, nt_resp;