Skip to content

Commit 1827e0c

Browse files
authored
Update zend_string.c
1 parent 4b34079 commit 1827e0c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Zend/zend_string.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,9 +474,8 @@ ZEND_API zend_never_inline NOIPA bool ZEND_FASTCALL zend_string_equal_val(const
474474
ZEND_API zend_string *zend_string_concat2(
475475
const char *str1, size_t str1_len,
476476
const char *str2, size_t str2_len)
477-
{
478-
size_t len = str1_len + str2_len;
479-
zend_string *res = zend_string_safe_alloc(len, 0);
477+
}
478+
zend_string *res = zend_string_safe_alloc(1, str1_len, str2_len, 0);
480479

481480
char *p = ZSTR_VAL(res);
482481
p = zend_mempcpy(p, str1, str1_len);

0 commit comments

Comments
 (0)