From: Alexander Feldman Date: Thu, 5 Oct 2000 18:06:55 +0000 (+0000) Subject: Fixed posix_addlimit() when adding the string "unlimited" to the result. X-Git-Tag: php-4.0.3~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=791cda209cab0510879f4cc1f6ee4991490fb436;p=php Fixed posix_addlimit() when adding the string "unlimited" to the result. Now the posix_getrlimit() function does not cause core dump. --- diff --git a/ext/posix/posix.c b/ext/posix/posix.c index 93c56eaac3..7cb17cf8db 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -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);