summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-02-16 17:25:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:01 -0500
commit4a18f37f22f7bfbfecd479d5e5363427c8e9a7ca (patch)
tree76dfaff5ffbb438a2459ba1494b50eaf98e6d7e1 /source3/nsswitch
parent216c5c51c545229610215cf41939cab2660ae6a2 (diff)
downloadsamba-4a18f37f22f7bfbfecd479d5e5363427c8e9a7ca.tar.gz
samba-4a18f37f22f7bfbfecd479d5e5363427c8e9a7ca.tar.bz2
samba-4a18f37f22f7bfbfecd479d5e5363427c8e9a7ca.zip
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)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbind_nss_linux.c4
1 files changed, 4 insertions, 0 deletions
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 */