From 4a18f37f22f7bfbfecd479d5e5363427c8e9a7ca Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 16 Feb 2007 17:25:54 +0000 Subject: r21394: Prevent nscd crash due to potential NULL pointer dereference in _nss_winbind_initgroups_dyn() on an empty group list. Guenther (This used to be commit 155b9e7c74d1a623e018fc2f8ca2e32e4aa3f213) --- source3/nsswitch/winbind_nss_linux.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/nsswitch') diff --git a/source3/nsswitch/winbind_nss_linux.c b/source3/nsswitch/winbind_nss_linux.c index ea21391e98..fa74194aa9 100644 --- a/source3/nsswitch/winbind_nss_linux.c +++ b/source3/nsswitch/winbind_nss_linux.c @@ -948,6 +948,10 @@ _nss_winbind_initgroups_dyn(char *user, gid_t group, long int *start, "and %d gids\n", getpid(), user, num_gids); #endif + if (gid_list == NULL) { + ret = NSS_STATUS_NOTFOUND; + goto done; + } /* Copy group list to client */ -- cgit