From 155b9e7c74d1a623e018fc2f8ca2e32e4aa3f213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Deschner?= Date: Fri, 16 Feb 2007 17:25:54 +0000 Subject: [PATCH] r21394: Prevent nscd crash due to potential NULL pointer dereference in _nss_winbind_initgroups_dyn() on an empty group list. Guenther --- source/nsswitch/winbind_nss_linux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/nsswitch/winbind_nss_linux.c b/source/nsswitch/winbind_nss_linux.c index ea21391e980..fa74194aa9d 100644 --- a/source/nsswitch/winbind_nss_linux.c +++ b/source/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 */