r21394: Prevent nscd crash due to potential NULL pointer dereference in
authorGünther Deschner <gd@samba.org>
Fri, 16 Feb 2007 17:25:54 +0000 (17:25 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:18:01 +0000 (12:18 -0500)
_nss_winbind_initgroups_dyn() on an empty group list.

Guenther
(This used to be commit 155b9e7c74d1a623e018fc2f8ca2e32e4aa3f213)

source3/nsswitch/winbind_nss_linux.c

index ea21391e9804b19acbcf16370d38a745ae76f9f3..fa74194aa9d7ec47ee31590aa4fb4904faacecdf 100644 (file)
@@ -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 */