mirror of
https://github.com/minetest/minetest.git
synced 2024-07-04 15:05:27 +02:00
lua: apply patch for "Chunk with too many lines may crash Lua"
This commit is contained in:
parent
b70a4b9bca
commit
5e95b245d0
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user