about summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
Diffstat (limited to 'nscd')
-rw-r--r--nscd/nscd_initgroups.c8
1 files changed, 6 insertions, 2 deletions
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)