From c2e6ebe22c7a6b51f4142073fb37e55b7f2b7737 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 13 May 2006 09:27:56 +0000 Subject: [PATCH] r15562: Attempt to fix Coverity bug # 283 (This used to be commit 3762effca5e1e2bbb2d1d9dd8504c502485eca7d) --- source3/nsswitch/winbindd_ads.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c index d233821111f..6115af9d2f4 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