]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:rpc_server/netlogon: make use of talloc_zero_array() for the netr_OneDomainInfo...
authorStefan Metzmacher <metze@samba.org>
Tue, 28 Aug 2018 14:30:17 +0000 (16:30 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 5 Sep 2018 11:31:43 +0000 (13:31 +0200)
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>
(cherry picked from commit ef0b489ad0d93199e08415dd895da5cfe2d1c11a)

source4/rpc_server/netlogon/dcerpc_netlogon.c

index 42558e9890b0fa2321d5d428cb41398b8dbaf69f..32bf1c8c0074ca83380fd44932a3fbceaeccd914 100644 (file)
@@ -2548,7 +2548,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);