Our parser uses recursion, so it causes stack overflow when parsing
deeply nested capture groups. E.g.:
x2("(" * 32767 + "a" + ")" * 32767, "a", 0, 1)
Set a limit for this.
The default value is defined in regint.h:
* DEFAULT_PARSE_DEPTH_LIMIT (Currently 4096)
Also add two APIs to support this:
* onig_get_parse_depth_limit
* onig_set_parse_depth_limit
How to reproduce:
Related:
#18#24This also occurs on Oniguruma 6.1.1.
Cc: @kkos
The text was updated successfully, but these errors were encountered: