Skip to content

Conversation

iluuu1994
Copy link
Member

We're setting the encoding from PHP_FUNCTION(mb_strpos), but mbfl_strpos would discard it, setting it to mbfl_encoding_pass, making zend_memnrstr fail due to a null-pointer exception.

Fixes GH-11217

iluuu1994 and others added 2 commits May 10, 2023 14:30
…ve offset

We're setting the encoding from PHP_FUNCTION(mb_strpos), but mbfl_strpos would
discard it, setting it to mbfl_encoding_pass, making zend_memnrstr fail due to a
null-pointer exception.

Fixes phpGH-11217
@alexdowad
Copy link
Contributor

alexdowad commented May 10, 2023 via email

@alexdowad
Copy link
Contributor

Looks good to me. Thanks very much, @iluuu1994.

Sorry that I took a couple days more than expected to get to this.

@iluuu1994 iluuu1994 closed this in aa553af May 15, 2023
@iluuu1994
Copy link
Member Author

@alexdowad No worries, there's are rarely a hurry. 🙂

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.

Segfault in mb_strrpos / mb_strripos when using negative offset and ASCII encoding
3 participants