From: Andreas Schneider Date: Wed, 17 Jul 2024 08:58:09 +0000 (+0200) Subject: s4:torture: Initialize struct cldap_netlogon X-Git-Tag: tdb-1.4.11~91 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7bb59168e9dea9c7a85010cdc8b70e9889f5a866;p=thirdparty%2Fsamba.git s4:torture: Initialize struct cldap_netlogon "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 Reviewed-by: Alexander Bokovoy Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Jul 18 13:48:03 UTC 2024 on atb-devel-224 --- diff --git a/source4/torture/ldap/cldapbench.c b/source4/torture/ldap/cldapbench.c index 96a6a5564dd..2b18749bc03 100644 --- a/source4/torture/ldap/cldapbench.c +++ b/source4/torture/ldap/cldapbench.c @@ -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);