k-takata / Onigmo

Onigmo is a regular expressions library forked from Oniguruma.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deeply nested capture groups cause stack overflow

k-takata opened this issue · comments

How to reproduce:

from testpy import *
# import onigmo
# set_encoding("UTF-8")
# set_output_encoding()
x2("(" * 32767 + "a" + ")" * 32767, "a", 0, 1)

Related: #18 #24

This also occurs on Oniguruma 6.1.1.
Cc: @kkos

Fixed in devel-6.0 branch with the commit e7a614b.
Closing.