Skip to content

Commit

Permalink
Merge pull request #1785 from Expensify/flo_matchlimit
Browse files Browse the repository at this point in the history
Use set_match_limit_recursion in SREMatch
  • Loading branch information
tylerkaraszewski authored Jun 25, 2024
2 parents 2c1102a + 4d31b8f commit 4ce6f15
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 4ce6f15

Please sign in to comment.