[php-src] PR #12983: Fix bug in mb_get_substr_slow (sometimes outputs wrong number of characters)
| From: | alexdowad | Date: | Wed, 20 Dec 2023 12:53:07 +0000 |
| Subject: | [php-src] PR #12983: Fix bug in mb_get_substr_slow (sometimes outputs wrong number of characters) | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-24549@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/12983
Author: alexdowad
Fixes #12972.
Thanks to @MauricioFauth for finding and reporting this bug.
The bug was introduced in October 2022. It originally only affected text encodings which do not have
a fixed byte width per characters and for which mbstring does not have an mblen_table. However, I
recently made another change to mbstring, such that mb_substr no longer relies on the mblen_table
even if one is available. Because of this change, the bug earlier introduced in October 2022 now
affected a greater number of text encodings, including UTF-8.
@Girgias @cmb69 @youkidearitai @nielsdos @kamil-tekiela