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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user