From: Ilia Alshanetsky Date: Mon, 8 Jan 2007 14:25:49 +0000 (+0000) Subject: MFB: Use safe_emalloc() rather then emalloc() X-Git-Tag: RELEASE_1_0_0RC1~356 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e33869d395a936a753a702f4d463fa3165c214c6;p=php MFB: Use safe_emalloc() rather then emalloc() --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 80d9c8ab9f..7b484e3896 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -4914,7 +4914,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 = emalloc(Z_STRLEN_P(result) + 1); + Z_STRVAL_P(result) = target = safe_emalloc(char_count, to_len, len); Z_TYPE_P(result) = IS_STRING; if (case_sensitivity) {