]> granicus.if.org Git - php/commitdiff
use safe_emalloc()
authorAntony Dovgal <tony2001@php.net>
Mon, 25 Dec 2006 20:44:28 +0000 (20:44 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 25 Dec 2006 20:44:28 +0000 (20:44 +0000)
ext/iconv/iconv.c

index 9dd1881cfed9795d575e7343bfc446d95bd86705..32c55b95e0ce98c5d4cd2a350518b264db484db9 100644 (file)
@@ -1105,7 +1105,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fn
                goto out;
        }
 
-       buf = emalloc(max_line_len + 5);
+       buf = safe_emalloc(1, max_line_len, 5);
 
        char_cnt = max_line_len;