summaryrefslogtreecommitdiff
path: root/ext/posix/posix.c
diff options
context:
space:
mode:
authorAlexander Feldman <sasha@php.net>2000-10-05 18:06:55 +0000
committerAlexander Feldman <sasha@php.net>2000-10-05 18:06:55 +0000
commit791cda209cab0510879f4cc1f6ee4991490fb436 (patch)
tree8c02ba356dc3a9cba52530ceeefc16a44ddf1b65 /ext/posix/posix.c
parentd84c5a2238dd65b1e44de4f9a31cec17cb41d48f (diff)
downloadphp-git-791cda209cab0510879f4cc1f6ee4991490fb436.tar.gz
Fixed posix_addlimit() when adding the string "unlimited" to the result.
Now the posix_getrlimit() function does not cause core dump.
Diffstat (limited to 'ext/posix/posix.c')
-rw-r--r--ext/posix/posix.c4
1 files changed, 2 insertions, 2 deletions
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);