forked from boostorg/regex
Regex: Set a limit on how many recursions we allow.
This commit is contained in:
@ -378,7 +378,7 @@ public:
|
||||
BidiIterator l_base)
|
||||
: m_result(what), base(first), last(end),
|
||||
position(first), backstop(l_base), re(e), traits_inst(e.get_traits()),
|
||||
m_independent(false), next_count(&rep_obj), rep_obj(&next_count)
|
||||
m_independent(false), next_count(&rep_obj), rep_obj(&next_count), m_recursions(0)
|
||||
{
|
||||
construct_init(e, f);
|
||||
}
|
||||
@ -566,6 +566,8 @@ private:
|
||||
bool m_unwound_alt;
|
||||
// We are unwinding a commit - used by independent subs to determine whether to stop there or carry on unwinding:
|
||||
//bool m_unwind_commit;
|
||||
// Recursion limit:
|
||||
unsigned m_recursions;
|
||||
#endif
|
||||
|
||||
// these operations aren't allowed, so are declared private,
|
||||
|
Reference in New Issue
Block a user