diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-05-13 09:27:56 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:17:01 -0500 |
commit | c2e6ebe22c7a6b51f4142073fb37e55b7f2b7737 (patch) | |
tree | 132b1f46bab5d21c711a491d40fbdbca7619f928 | |
parent | bc89437cca94e6a6fcfb9299d53ac2c55b44491d (diff) | |
download | samba-c2e6ebe22c7a6b51f4142073fb37e55b7f2b7737.tar.gz samba-c2e6ebe22c7a6b51f4142073fb37e55b7f2b7737.tar.bz2 samba-c2e6ebe22c7a6b51f4142073fb37e55b7f2b7737.zip |
r15562: Attempt to fix Coverity bug # 283
(This used to be commit 3762effca5e1e2bbb2d1d9dd8504c502485eca7d)
-rw-r--r-- | source3/nsswitch/winbindd_ads.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c index d233821111..6115af9d2f 100644 --- a/source3/nsswitch/winbindd_ads.c +++ b/source3/nsswitch/winbindd_ads.c @@ -849,6 +849,14 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain, (*name_types) = TALLOC_ZERO_ARRAY(mem_ctx, uint32, num_members); (*names) = TALLOC_ZERO_ARRAY(mem_ctx, char *, num_members); + if ((num_members != 0) && + ((members == NULL) || (*sid_mem == NULL) || + (*name_types == NULL) || (*names == NULL))) { + DEBUG(1, ("talloc failed\n")); + status = NT_STATUS_NO_MEMORY; + goto done; + } + for (i=0;i<num_members;i++) { uint32 name_type; char *name; |