summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/posix/posix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index 7c2931a865..949fac223d 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -1196,7 +1196,9 @@ PHP_FUNCTION(posix_initgroups)
RETURN_FALSE;
}
- if(strlen(name)==0) RETURN_FALSE;
+ if (name_len == 0) {
+ RETURN_FALSE;
+ }
RETURN_BOOL(!initgroups((const char *)name, basegid));
}