mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s4:rpc_server/netlogon: make use of talloc_zero_array() for the netr_OneDomainInfo array
It's much safer than having uninitialized memory when we hit an error case. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11517 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
61333f7787
commit
ef0b489ad0
@ -2582,7 +2582,7 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal
|
||||
}
|
||||
|
||||
domain_info->trusted_domain_count = ret3 + 1;
|
||||
domain_info->trusted_domains = talloc_array(mem_ctx,
|
||||
domain_info->trusted_domains = talloc_zero_array(mem_ctx,
|
||||
struct netr_OneDomainInfo,
|
||||
domain_info->trusted_domain_count);
|
||||
NT_STATUS_HAVE_NO_MEMORY(domain_info->trusted_domains);
|
||||
|
Loading…
Reference in New Issue
Block a user