From 791cda209cab0510879f4cc1f6ee4991490fb436 Mon Sep 17 00:00:00 2001 From: Alexander Feldman Date: Thu, 5 Oct 2000 18:06:55 +0000 Subject: [PATCH] Fixed posix_addlimit() when adding the string "unlimited" to the result. Now the posix_getrlimit() function does not cause core dump. --- ext/posix/posix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/posix/posix.c b/ext/posix/posix.c index 93c56eaac3f..7cb17cf8dba 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);