1
0
mirror of https://github.com/php/php-src.git synced 2026-04-11 01:53:36 +02:00

Fixed posix_addlimit() when adding the string "unlimited" to the result.

Now the posix_getrlimit() function does not cause core dump.
This commit is contained in:
Alexander Feldman
2000-10-05 18:06:55 +00:00
parent d84c5a2238
commit 791cda209c

View File

@@ -849,12 +849,12 @@ static int posix_addlimit(int limit, char *name, pval *return_value) {
}
if (rl.rlim_cur == RLIM_INFINITY)
add_assoc_stringl(return_value,soft,"unlimited", 9, 0);
add_assoc_string(return_value,soft,"unlimited", 1);
else
add_assoc_long(return_value,soft,rl.rlim_cur);
if (rl.rlim_max == RLIM_INFINITY)
add_assoc_stringl(return_value,hard,"unlimited", 9, 0);
add_assoc_string(return_value,hard,"unlimited", 1);
else
add_assoc_long(return_value,hard,rl.rlim_max);