Skip to content

Commit 836e617

Browse files
authored
Changed to zend_string_safe_alloc
1 parent e75fba2 commit 836e617

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ext/standard/url.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ PHPAPI void php_url_free(php_url *theurl)
4949

5050
static void php_str_to_utf8(const char *str, size_t len)
5151
{
52-
zend_string *utf8;
53-
utf8 = zend_string_alloc(len * 4, 0);
52+
zend_string *utf8 = zend_string_safe_alloc(len, 4, 0, 0);
5453
const unsigned char *s = (const unsigned char *)str;
5554
const unsigned char *e = s + len;
5655
unsigned char *d = (unsigned char *)ZSTR_VAL(utf8);

0 commit comments

Comments
 (0)