Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix RT #121321 - Fencepost error causes infinite loop in regex compil…
…ation Due to a fencepost error if a pattern had more than 9 capture buffers and after the last capture buffer there was an octal style escape which when interpreted as decimal evaluated to one more than the number of defined buffers then the regex compiler would go into an infinite loop. This fixes the fencepost error, adds tests, and adds some comments to explain what is going on.
- Loading branch information
Showing
2 changed files
with
22 additions
and
2 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