Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 3, 2023

Conversation

devnexen
Copy link
Member

@devnexen devnexen commented Jul 2, 2023

…e size of the buffer.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line also needed? I would expect the zend_string_truncate() function to provide a null terminated string.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess so :)

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows faiilure unrelated

@devnexen devnexen merged commit 44fa68b into php:master Jul 3, 2023
iluuu1994 added a commit to iluuu1994/php-src that referenced this pull request Jul 4, 2023
iluuu1994 added a commit to iluuu1994/php-src that referenced this pull request Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants