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 Fixes: QTBUG-127672 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit a041cd35214e57a189aaa1f1f77199ff42303f83) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| CMakeLists.txt | ||
| tst_qregularexpression.cpp | ||