git.samba.org
/
gd
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fab6d20
)
fixed typo in getgroups code
author
Andrew Tridgell
<tridge@samba.org>
Mon, 5 Oct 1998 08:42:41 +0000
(08:42 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Mon, 5 Oct 1998 08:42:41 +0000
(08:42 +0000)
(This used to be commit
046e8a50219ca69ab326fa672c5fcb1ab3689b3b
)
source3/lib/system.c
patch
|
blob
|
history
diff --git
a/source3/lib/system.c
b/source3/lib/system.c
index 4009e63169b767365f59cc76d6f6e97d0ddf7fdb..deca7e1b6a9b3040bd1b319493f373653df3de2c 100644
(file)
--- 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;
}