From: stas at FreeBSD dot org Operating system: FreeBSD PHP version: 5.2.1 PHP Bug Type: POSIX related Bug description: [PATCH]:getgrgid_r, getgrnam_r etc functions regression(crash)
Description: ------------ This module has problems with functions like getgrgid_r etc. It tries to find out limits using sysconf, but FreeBSD doesn't have, e.g. _SC_GETPW_R_SIZE_MAX. Since it does't try to check the return value it effectively leads to attempt to allocate (size_t)-1 bytes, which obviously fails, since trying to allocate (size_t)-1 bytes exceeds any limits. Reproduce code: --------------- $groupinfo = posix_getgrgid(0); print_r($groupinfo); Expected result: ---------------- something meaningful -- Edit bug report at http://bugs.php.net/?id=40600&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40600&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40600&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40600&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40600&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40600&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40600&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40600&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40600&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40600&r=support Expected behavior: http://bugs.php.net/fix.php?id=40600&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40600&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40600&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40600&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40600&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40600&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40600&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40600&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40600&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40600&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40600&r=mysqlcfg