From 4d31b8fd0f97f55f5500257dda91df989d5f67c5 Mon Sep 17 00:00:00 2001 From: Florent De Neve Date: Tue, 25 Jun 2024 14:12:11 +0200 Subject: [PATCH] Use set_match_limit_recursion in SREMatch --- libstuff/libstuff.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libstuff/libstuff.cpp b/libstuff/libstuff.cpp index 42544bcb6..329c9ced0 100644 --- a/libstuff/libstuff.cpp +++ b/libstuff/libstuff.cpp @@ -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) {