]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:torture: Initialize struct netr_LogonSamLogonEx
authorAndreas Schneider <asn@samba.org>
Thu, 20 Jun 2024 12:44:33 +0000 (14:44 +0200)
committerMartin Schwenke <martins@samba.org>
Sun, 30 Jun 2024 23:20:33 +0000 (23:20 +0000)
"Error: UNINIT (CWE-457):
samba-4.20.0rc2/source4/torture/rpc/schannel.c:250: var_decl: Declaring variable ""r"" without initializer.
samba-4.20.0rc2/source4/torture/rpc/schannel.c:357: uninit_use_in_call: Using uninitialized value ""r.in.validation_level"" when calling ""torture_comment"".
  355|    ""LogonSamLogonEx failed"");
  356|    } else {
  357|->  torture_comment(tctx,
  358|    ""Skip auth_level[%u] Testing LogonSamLogonEx with name %s using %s and validation_level: %d\n"",
  359|    auth_level, ninfo.identity_info.account_name.string, crypto_alg,"

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
source4/torture/rpc/schannel.c

index d6dca3666702f39d3a6cd5ff3c576d0cc48ad7a4..04752424cd2545ae6cc00c327c35f0076444261a 100644 (file)
@@ -247,7 +247,11 @@ static bool test_netlogon_ex_bug14932(struct dcerpc_pipe *p,
                                      struct netlogon_creds_CredentialState *creds)
 {
        NTSTATUS status;
-       struct netr_LogonSamLogonEx r;
+       struct netr_LogonSamLogonEx r = {
+               .in = {
+                       .flags = 0,
+               }
+       };
        struct netr_NetworkInfo ninfo;
        union netr_LogonLevel logon;
        union netr_Validation validation;