mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02: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:
parent
0ce4f91d73
commit
44fa68b064
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue