1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

ext/intl: intl_CharFromString using zend_string_truncate to adjust th… (#11575)

* ext/intl: intl_CharFromString using zend_string_truncate to adjust the size of the buffer.
This commit is contained in:
David CARLIER
2023-07-03 16:41:20 +01:00
committed by GitHub
parent 0ce4f91d73
commit 44fa68b064

View File

@@ -79,8 +79,7 @@ zend_string* intl_charFromString(const UnicodeString &from, UErrorCode *status)
zend_string_free(u8res);
return NULL;
}
ZSTR_VAL(u8res)[actual_len] = '\0';
ZSTR_LEN(u8res) = actual_len;
u8res = zend_string_truncate(u8res, actual_len, 0);
return u8res;
}