[php-src] PR #18906: Fix GH-18901: integer overflow mb_split
| From: | nielsdos | Date: | Sun, 22 Jun 2025 08:27:48 +0000 |
| Subject: | [php-src] PR #18906: Fix GH-18901: integer overflow mb_split | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-32133@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/18906
Author: nielsdos
We prevent signed overflow by making the count unsigned. The actual interpretation of the count
doesn't matter as it's just used to denote a limit.
The test output for some limit values looks strange though, so that may need extra investigation.
However, that's orthogonal to this fix.
I.e. I think
((OnigUChar *)(string + beg) - chunk_pos)) needs to be ((OnigUChar
*)(string + end) - chunk_pos))