From: Andreas Schneider Date: Wed, 17 Jul 2024 08:55:28 +0000 (+0200) Subject: s4:torture: Initialize struct netr_LogonSamLogonEx X-Git-Tag: tdb-1.4.11~93 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=125c5a93bbb60b68d054db59aef37ebb77bdb4da;p=thirdparty%2Fsamba.git s4:torture: Initialize struct netr_LogonSamLogonEx "Error: UNINIT (CWE-457): samba-4.20.0rc2/source4/torture/rpc/schannel.c:49: var_decl: Declaring variable ""r"" without initializer. samba-4.20.0rc2/source4/torture/rpc/schannel.c:152: uninit_use_in_call: Using uninitialized value ""r.in.validation_level"" when calling ""torture_comment"". 150| ""LogonSamLogonEx failed""); 151| } else { 152|-> torture_comment(tctx, 153| ""Skip auth_level[%u] Testing LogonSamLogonEx with name %s using %s and validation_level: %d\n"", 154| auth_level, ninfo.identity_info.account_name.string, crypto_alg," Signed-off-by: Andreas Schneider Reviewed-by: Alexander Bokovoy --- diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c index 04752424cd2..fab1fa4af45 100644 --- a/source4/torture/rpc/schannel.c +++ b/source4/torture/rpc/schannel.c @@ -46,7 +46,7 @@ bool test_netlogon_ex_ops(struct dcerpc_pipe *p, struct torture_context *tctx, struct netlogon_creds_CredentialState *creds) { NTSTATUS status; - struct netr_LogonSamLogonEx r; + struct netr_LogonSamLogonEx r = {}; struct netr_NetworkInfo ninfo; union netr_LogonLevel logon; union netr_Validation validation;