From 80ae082c8760ac4218b454d8c7d6b7e4203bdd8c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 5 Oct 1998 08:42:41 +0000 Subject: fixed typo in getgroups code (This used to be commit 046e8a50219ca69ab326fa672c5fcb1ab3689b3b) --- source3/lib/system.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/lib') diff --git a/source3/lib/system.c b/source3/lib/system.c index 4009e63169..deca7e1b6a 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -673,7 +673,9 @@ int sys_getgroups(int setlen, gid_t *gidset) return -1; } - if((group_list = (GID_T *)malloc(setlen * sizoef(GID_T))) == NULL) { + if (setlen == 0) setlen = 1; + + if((group_list = (GID_T *)malloc(setlen * sizeof(GID_T))) == NULL) { DEBUG(0,("sys_getgroups: Malloc fail.\n")); return -1; } -- cgit