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:
sfan5 2024-06-24 17:32:42 +02:00
parent c1520c9e11
commit 88ffe75b58

@ -133,7 +133,7 @@ static void inclinenumber (LexState *ls) {
if (currIsNewline(ls) && ls->current != old) if (currIsNewline(ls) && ls->current != old)
next(ls); /* skip `\n\r' or `\r\n' */ next(ls); /* skip `\n\r' or `\r\n' */
if (++ls->linenumber >= MAX_INT) if (++ls->linenumber >= MAX_INT)
luaX_syntaxerror(ls, "chunk has too many lines"); luaX_lexerror(ls, "chunk has too many lines", 0);
} }