]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:torture: Initialize struct cldap_netlogon
authorAndreas Schneider <asn@samba.org>
Wed, 17 Jul 2024 08:58:09 +0000 (10:58 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 18 Jul 2024 13:48:03 +0000 (13:48 +0000)
"Error: UNINIT (CWE-457):
samba-4.20.0rc2/source4/torture/ldap/cldapbench.c:40: var_decl: Declaring variable ""io"" without initializer.
samba-4.20.0rc2/source4/torture/ldap/cldapbench.c:45: uninit_use_in_call: Using uninitialized value ""io.in.map_response"" when calling ""cldap_netlogon_recv"".
   43|    TALLOC_CTX *tmp_ctx = talloc_new(NULL);
   44|    io.in.version = 6;
   45|->  status = cldap_netlogon_recv(req, tmp_ctx, &io);
   46|    talloc_free(req);
   47|    if (NT_STATUS_IS_OK(status)) {"

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jul 18 13:48:03 UTC 2024 on atb-devel-224

source4/torture/ldap/cldapbench.c

index 96a6a5564dd639b86aad9793d28c16d0e9c7ebbc..2b18749bc0373c5ca271b03a0b9b76712f8b6788 100644 (file)
@@ -37,7 +37,7 @@ struct bench_state {
 
 static void request_netlogon_handler(struct tevent_req *req)
 {
-       struct cldap_netlogon io;
+       struct cldap_netlogon io = {};
        struct bench_state *state = tevent_req_callback_data(req, struct bench_state);
        NTSTATUS status;
        TALLOC_CTX *tmp_ctx = talloc_new(NULL);