From f7fa2b1951287b71711228e1fa6ddf97982f1efd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 1 Oct 2004 21:35:08 +0000 Subject: (__nscd_getgrouplist): Add assert. --- nscd/nscd_initgroups.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'nscd') diff --git a/nscd/nscd_initgroups.c b/nscd/nscd_initgroups.c index d6cb00000e..3e4d92609e 100644 --- a/nscd/nscd_initgroups.c +++ b/nscd/nscd_initgroups.c @@ -128,8 +128,12 @@ __nscd_getgrouplist (const char *user, gid_t group, long int *size, } } else - /* No group found yet. */ - retval = 0; + { + /* No group found yet. */ + retval = 0; + + assert (*size >= 1); + } /* Check whether GROUP is part of the mix. If not, add it. */ if (retval >= 0) -- cgit v1.2.3