-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QRegularExpression: coalesce consecutive * tokens in wildcards
When converting a wildcard into a regexp, convert a series of consecutive '*' tokens in just one '.*' (instead of a series of '.*'). The pattern matched is the same, but we reduce the effects of a possible catastrophic backtracking. I'm not actually sure whether PCRE optimizes this case out of its own or it doesn't; Perl appears not to. Change-Id: Ia83336391593d56cf6d8332c96649a034a83a15b Pick-to: 6.8 Fixes: QTBUG-127672 Reviewed-by: Thiago Macieira <[email protected]>
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 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