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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user