tony2001                Fri Sep 21 14:05:18 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/standard       filestat.c 
  Log:
  MFH: check the return value of getgroups() for -1 (coverity issue #390)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/filestat.c?r1=1.136.2.8.2.13&r2=1.136.2.8.2.14&diff_format=u
Index: php-src/ext/standard/filestat.c
diff -u php-src/ext/standard/filestat.c:1.136.2.8.2.13 
php-src/ext/standard/filestat.c:1.136.2.8.2.14
--- php-src/ext/standard/filestat.c:1.136.2.8.2.13      Mon Jul 23 23:03:09 2007
+++ php-src/ext/standard/filestat.c     Fri Sep 21 14:05:18 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: filestat.c,v 1.136.2.8.2.13 2007/07/23 23:03:09 iliaa Exp $ */
+/* $Id: filestat.c,v 1.136.2.8.2.14 2007/09/21 14:05:18 tony2001 Exp $ */
 
 #include "php.h"
 #include "safe_mode.h"
@@ -821,7 +821,7 @@
                        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<n;i++){

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to