]> granicus.if.org Git - php/commitdiff
Fixed posix_addlimit() when adding the string "unlimited" to the result.
authorAlexander Feldman <sasha@php.net>
Thu, 5 Oct 2000 18:06:55 +0000 (18:06 +0000)
committerAlexander Feldman <sasha@php.net>
Thu, 5 Oct 2000 18:06:55 +0000 (18:06 +0000)
Now the posix_getrlimit() function does not cause core dump.

ext/posix/posix.c

index 93c56eaac3fa570b3c3f1e63a32d406ace24ecec..7cb17cf8dba3917b2ba039fb9455213b9b94d068 100644 (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);