-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
maketables: avoid misleading values in case flipping table (#313)
The tables generated by pcre2_maketables() include one that maps all lowercase characters on the first 255 code points to their corresponding upper case code point, but fails to notice that toupper() could return a larger code point and therefore result in the store of a truncated and unrelated code instead. Restrict all values to what is valid for uint8_t and document in the test case the failure for character 'μ'[1] (U+00B5) and that was incorrectly getting back 924 (U+039C) from macOS fr_FR, and resulting in an incorrect case equivalent with the truncated value of 159. [1] https://en.wikipedia.org/wiki/Mu_(letter)
- Loading branch information
Showing
5 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,6 +75,11 @@ | |
\= Expect no match | ||
�cole | ||
|
||
/\xb5/i | ||
� | ||
\= Expect no match | ||
\x9c | ||
|
||
/\W+/ | ||
>>>\xaa<<< | ||
>>>\xba<<< | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters