diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 3ace3c75517..60a3a53ccb1 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -877,7 +877,7 @@ PHPAPI void php_stat(const char *filename, php_stat_len filename_length, int typ gid_t *gids; groups = getgroups(0, NULL); - if(groups) { + if(groups > 0) { gids=(gid_t *)safe_emalloc(groups, sizeof(gid_t), 0); n=getgroups(groups, gids); for(i=0;i