[php-src] Issue #11217: Segfault in mb_strrpos / mb_strripos when using negative offset and ASCII encoding
| From: | rgeraads | Date: | Wed, 10 May 2023 10:26:54 +0000 |
| Subject: | [php-src] Issue #11217: Segfault in mb_strrpos / mb_strripos when using negative offset and ASCII encoding | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-244419@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/11217
Author: rgeraads
### Description
The following code:
```php
<?php
var_dump(mb_strrpos('foo', 'foo', -1, 'ASCII'));
var_dump(mb_strripos('foo', 'foo', -1, 'ASCII'));
```
Resulted in this output:
```
Segmentation fault
```
But I expected this output instead:
```
bool(false)
bool(false)
```
https://3v4l.org/BlLRn
### PHP Version
PHP 8.2.0
### Operating System
_No response_