]> 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:35:25 +0000 (13:35 +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 71ab942ae9bafe6a5794f250ce976e19fb684d13..12d6bcd14c268f44e5bcfd876b98f302a5294c39 100644 (file)
@@ -2349,7 +2349,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);