mirror of
https://github.com/nmap/nmap.git
synced 2026-07-10 18:24:41 +00:00
Limit heap mem per pattern match
This commit is contained in:
parent
713f8091ba
commit
b150def88c
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue