summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-02-16 17:25:54 +0000
committerGünther Deschner <gd@samba.org>2007-02-16 17:25:54 +0000
commit672b98e27edc28d71640197668bdc38d854c6a16 (patch)
tree921c8627fc9c17d952648c47c2bc731b5cedfce5
parent2fd6ac36189de29a52a8ea981a87406724703123 (diff)
downloadsamba-672b98e27edc28d71640197668bdc38d854c6a16.tar.gz
samba-672b98e27edc28d71640197668bdc38d854c6a16.tar.xz
samba-672b98e27edc28d71640197668bdc38d854c6a16.zip
r21394: Prevent nscd crash due to potential NULL pointer dereference in
_nss_winbind_initgroups_dyn() on an empty group list. Guenther
-rw-r--r--source/nsswitch/winbind_nss_linux.c4
1 files changed, 4 insertions, 0 deletions
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 */