mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
lua: apply patch for "Chunk with too many lines may crash Lua"
<https://lua.org/bugs.html#5.2.3-3>
This commit is contained in:
@@ -133,7 +133,7 @@ static void inclinenumber (LexState *ls) {
|
||||
if (currIsNewline(ls) && ls->current != old)
|
||||
next(ls); /* skip `\n\r' or `\r\n' */
|
||||
if (++ls->linenumber >= MAX_INT)
|
||||
luaX_syntaxerror(ls, "chunk has too many lines");
|
||||
luaX_lexerror(ls, "chunk has too many lines", 0);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user