Skip to content

Commit 082cb7b

Browse files
committed
Update zend_string.c
1 parent 769f1c1 commit 082cb7b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Zend/zend_string.c

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

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

0 commit comments

Comments
 (0)