Limit heap mem per pattern match

This commit is contained in:
dmiller 2026-05-26 18:56:46 +00:00
parent 713f8091ba
commit b150def88c

View file

@ -465,6 +465,9 @@ void ServiceProbeMatch::InitMatch(const char *matchtext, int lineno) {
#else
pcre2_set_recursion_limit(match_context, 10000);
#endif
#ifdef pcre2_set_heap_limit
pcre2_set_heap_limit(match_context, 10); // units = kibibytes
#endif
/* OK! Now we look for any templates of the form ?/.../
* where ? is either p, v, i, h, o, or d. / is any