Skip to content

Commit 4b34079

Browse files
committed
use zend_string_safe_alloc
1 parent f4b275b commit 4b34079

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Zend/zend_string.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,8 @@ ZEND_API zend_string *zend_string_concat2(
475475
const char *str1, size_t str1_len,
476476
const char *str2, size_t str2_len)
477477
{
478-
size_t len = zend_safe_address_guarded(1, str1_len, str2_len);
479-
zend_string *res = zend_string_alloc(len, 0);
478+
size_t len = str1_len + str2_len;
479+
zend_string *res = zend_string_safe_alloc(len, 0);
480480

481481
char *p = ZSTR_VAL(res);
482482
p = zend_mempcpy(p, str1, str1_len);

0 commit comments

Comments
 (0)