From: Antony Dovgal Date: Sat, 10 Feb 2007 00:50:38 +0000 (+0000) Subject: MFH X-Git-Tag: php-5.2.2RC1~435 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b12fd5492984383fd5c7d046e6572fe0ecef068;p=php MFH --- diff --git a/ext/posix/posix.c b/ext/posix/posix.c index baf72cbf29..0c37784264 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -872,7 +872,7 @@ PHP_FUNCTION(posix_getgrnam) PHP_FUNCTION(posix_getgrgid) { long gid; -#ifdef HAVE_GETGRGID_R +#if defined(ZTS) && defined(HAVE_GETGRGID_R) && defined(_SC_GETGR_R_SIZE_MAX) int ret; struct group _g; struct group *retgrptr; diff --git a/ext/standard/string.c b/ext/standard/string.c index 70d26264e8..aec6624b65 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -3148,7 +3148,7 @@ PHPAPI int php_char_to_str_ex(char *str, uint len, char from, char *to, int to_l } Z_STRLEN_P(result) = len + (char_count * (to_len - 1)); - Z_STRVAL_P(result) = target = safe_emalloc(char_count, to_len, len); + Z_STRVAL_P(result) = target = safe_emalloc(char_count, to_len, len + 1); Z_TYPE_P(result) = IS_STRING; if (case_sensitivity) {