diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-07-05 10:52:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:19:16 -0500 |
commit | 1f01bafd44dea9dd497f67fe4c50790d4c21256f (patch) | |
tree | d7fcae7fb10a3760a8058d998ebb6ef0334e5a65 /source4/auth | |
parent | 11ca21e93c247c74e85ed1ce284893d6b70cd8cf (diff) | |
download | samba-1f01bafd44dea9dd497f67fe4c50790d4c21256f.tar.gz samba-1f01bafd44dea9dd497f67fe4c50790d4c21256f.tar.bz2 samba-1f01bafd44dea9dd497f67fe4c50790d4c21256f.zip |
r8163: if sidcount is zero it happened that we return NT_STATUS_NO_MEMORY...
metze
(This used to be commit a9ff35a1a24f2d2935e67855fee5011ea528029f)
Diffstat (limited to 'source4/auth')
-rw-r--r-- | source4/auth/auth_util.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/auth/auth_util.c b/source4/auth/auth_util.c index 2b9b0c25c2..be7992ae82 100644 --- a/source4/auth/auth_util.c +++ b/source4/auth/auth_util.c @@ -367,11 +367,13 @@ NTSTATUS make_server_info_netlogon_validation(TALLOC_CTX *mem_ctx, size_t sidcount = server_info->n_domain_groups + validation->sam3->sidcount; size_t n_dgrps = server_info->n_domain_groups; - dgrps = talloc_realloc(server_info, dgrps, struct dom_sid*, sidcount); - NT_STATUS_HAVE_NO_MEMORY(dgrps); + if (validation->sam3->sidcount > 0) { + dgrps = talloc_realloc(server_info, dgrps, struct dom_sid*, sidcount); + NT_STATUS_HAVE_NO_MEMORY(dgrps); - for (i = 0; i < validation->sam3->sidcount; i++) { - dgrps[n_dgrps + i] = talloc_reference(dgrps, validation->sam3->sids[i].sid); + for (i = 0; i < validation->sam3->sidcount; i++) { + dgrps[n_dgrps + i] = talloc_reference(dgrps, validation->sam3->sids[i].sid); + } } server_info->n_domain_groups = sidcount; |