From: Andreas Schneider Date: Tue, 9 Jun 2026 13:08:56 +0000 (+0200) Subject: libcli: Fix another stringop-overflow false positive X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=53b6d82ae7992bf2cb8769eef40a68ddcdab8afe;p=thirdparty%2Fsamba.git libcli: Fix another stringop-overflow false positive libcli/auth/netlogon_creds_cli.c: In function ‘netlogon_creds_cli_check_negotiate_caps’: lib/replace/replace.h:850:24: error: ‘memset_explicit’ writing 16 bytes into a region of size 8 overflows the destination [-Werror=stringop-overflow=] Signed-off-by: Andreas Schneider Reviewed-by: Anoop C S --- diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c index 736c2f114ca..2f76c47a4e7 100644 --- a/libcli/auth/netlogon_creds_cli.c +++ b/libcli/auth/netlogon_creds_cli.c @@ -1977,7 +1977,7 @@ struct tevent_req *netlogon_creds_cli_check_send(TALLOC_CTX *mem_ctx, if (tevent_req_nterror(req, status)) { return tevent_req_post(req, ev); } - ZERO_STRUCT(state->rep_auth); + state->rep_auth = (struct netr_Authenticator){0}; subreq = dcerpc_netr_LogonGetCapabilities_send(state, state->ev, state->binding_handle, @@ -2177,7 +2177,7 @@ static void netlogon_creds_cli_check_negotiate_caps(struct tevent_req *subreq) if (tevent_req_nterror(req, status)) { return; } - ZERO_STRUCT(state->rep_auth); + state->rep_auth = (struct netr_Authenticator){0}; subreq = dcerpc_netr_LogonGetCapabilities_send(state, state->ev, state->binding_handle, @@ -2569,7 +2569,7 @@ static void netlogon_creds_cli_ServerPasswordSet_locked(struct tevent_req *subre if (tevent_req_nterror(req, status)) { return; } - ZERO_STRUCT(state->rep_auth); + state->rep_auth = (struct netr_Authenticator){0}; if (state->tmp_creds.negotiate_flags & NETLOGON_NEG_PASSWORD_SET2) { @@ -3013,7 +3013,7 @@ static void netlogon_creds_cli_LogonSamLogon_start(struct tevent_req *req) netlogon_creds_cli_LogonSamLogon_cleanup(req, status); return; } - ZERO_STRUCT(state->rep_auth); + state->rep_auth = (struct netr_Authenticator){0}; state->logon = netlogon_creds_shallow_copy_logon(state, state->logon_level, @@ -3440,7 +3440,7 @@ static void netlogon_creds_cli_DsrUpdateReadOnlyServerDnsRecords_locked(struct t if (tevent_req_nterror(req, status)) { return; } - ZERO_STRUCT(state->rep_auth); + state->rep_auth = (struct netr_Authenticator){0}; subreq = dcerpc_netr_DsrUpdateReadOnlyServerDnsRecords_send(state, state->ev, state->binding_handle, @@ -3689,7 +3689,7 @@ static void netlogon_creds_cli_ServerGetTrustInfo_locked(struct tevent_req *subr if (tevent_req_nterror(req, status)) { return; } - ZERO_STRUCT(state->rep_auth); + state->rep_auth = (struct netr_Authenticator){0}; subreq = dcerpc_netr_ServerGetTrustInfo_send(state, state->ev, state->binding_handle, @@ -3975,7 +3975,7 @@ static void netlogon_creds_cli_GetForestTrustInformation_locked(struct tevent_re if (tevent_req_nterror(req, status)) { return; } - ZERO_STRUCT(state->rep_auth); + state->rep_auth = (struct netr_Authenticator){0}; subreq = dcerpc_netr_GetForestTrustInformation_send(state, state->ev, state->binding_handle, @@ -4234,7 +4234,7 @@ static void netlogon_creds_cli_SendToSam_locked(struct tevent_req *subreq) if (tevent_req_nterror(req, status)) { return; } - ZERO_STRUCT(state->rep_auth); + state->rep_auth = (struct netr_Authenticator){0}; status = netlogon_creds_encrypt_SendToSam(&state->tmp_creds, state->opaque.data, @@ -4490,7 +4490,7 @@ static void netlogon_creds_cli_LogonGetDomainInfo_locked(struct tevent_req *subr if (tevent_req_nterror(req, status)) { return; } - ZERO_STRUCT(state->rep_auth); + state->rep_auth = (struct netr_Authenticator){0}; subreq = dcerpc_netr_LogonGetDomainInfo_send(state, state->ev, state->binding_handle,