summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-05 08:42:41 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-05 08:42:41 +0000
commit80ae082c8760ac4218b454d8c7d6b7e4203bdd8c (patch)
treeda9ee3839d20a3d9e3181dde3f19251805947ca0
parentfab6d20f5dfaafc874d9e540551856fc53d4add1 (diff)
downloadsamba-80ae082c8760ac4218b454d8c7d6b7e4203bdd8c.tar.gz
samba-80ae082c8760ac4218b454d8c7d6b7e4203bdd8c.tar.bz2
samba-80ae082c8760ac4218b454d8c7d6b7e4203bdd8c.zip
fixed typo in getgroups code
(This used to be commit 046e8a50219ca69ab326fa672c5fcb1ab3689b3b)
-rw-r--r--source3/lib/system.c4
1 files changed, 3 insertions, 1 deletions
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;
}