From 60e20922eb449c8a3c9b1b9ba427d46eb9ee153a Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Mon, 8 Jan 2007 14:24:59 +0000 Subject: [PATCH] Use safe_emalloc() rather then emalloc() --- ext/standard/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/string.c b/ext/standard/string.c index 15854f28d8..34609bcdb1 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -3144,7 +3144,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) { -- 2.50.1