Skip to content

Commit

Permalink
Use set_match_limit_recursion in SREMatch
Browse files Browse the repository at this point in the history
  • Loading branch information
flodnv committed Jun 25, 2024
1 parent 92aaa14 commit 4d31b8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libstuff/libstuff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2806,11 +2806,11 @@ bool SIsValidSQLiteDateModifier(const string& modifier) {
}

bool SREMatch(const string& regExp, const string& s) {
return pcrecpp::RE(regExp).FullMatch(s);
return pcrecpp::RE(regExp, pcrecpp::RE_Options().set_match_limit_recursion(1000)).FullMatch(s);
}

bool SREMatch(const string& regExp, const string& s, string& match) {
return pcrecpp::RE(regExp).FullMatch(s, &match);
return pcrecpp::RE(regExp, pcrecpp::RE_Options().set_match_limit_recursion(1000)).FullMatch(s, &match);
}

void SRedactSensitiveValues(string& s) {
Expand Down

0 comments on commit 4d31b8f

Please sign in to comment.