Limit recursion depth in string.match() et al.

This commit is contained in:
Mike Pall
2012-08-28 21:22:23 +02:00
parent 751cd9d821
commit ff00a78f3a
2 changed files with 41 additions and 26 deletions

View File

@@ -91,6 +91,7 @@ ERRDEF(STRPATC, "invalid pattern capture")
ERRDEF(STRPATE, "malformed pattern (ends with " LUA_QL("%") ")")
ERRDEF(STRPATM, "malformed pattern (missing " LUA_QL("]") ")")
ERRDEF(STRPATU, "unbalanced pattern")
ERRDEF(STRPATX, "pattern too complex")
ERRDEF(STRCAPI, "invalid capture index")
ERRDEF(STRCAPN, "too many captures")
ERRDEF(STRCAPU, "unfinished capture")