-
Notifications
You must be signed in to change notification settings - Fork 560
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
regmatch: Use new utf8_to_uv; not utf8_to_uvchr_buf
This is a subtle bug fix when the input is malformed UTF-8. We say we don't support malformed, but this commit is a step towards better protecting against that eventuality. Prior to this commit, some patterns that would exhibit different matching behavior of malformed input depending on if utf8 warnings were enabled or not. This is because utf8_to_uvchr_buf() returns NUL if utf8 warnings are on; and the REPLACEMENT CHARACTER if they are off. If the match criteria accepts one but not the other, the behavior would differ. Now, the match stops immediately without it being considered a match when a malformed input character is found
- Loading branch information
1 parent
00f06a3
commit 702e074
Showing
1 changed file
with
27 additions
and
36 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