mirror of
https://github.com/lua/lua
synced 2026-09-27 00:28:25 +03:00
bug: Chunk with too many lines can seg. fault
This commit is contained in:
parent
44be021309
commit
ce74637ace
1 changed files with 2 additions and 2 deletions
4
llex.c
4
llex.c
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: llex.c,v 2.63.1.1 2013/04/12 18:48:47 roberto Exp roberto $
|
||||
** $Id: llex.c,v 2.63.1.2 2013/08/30 15:49:41 roberto Exp roberto $
|
||||
** Lexical Analyzer
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
|
@ -152,7 +152,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");
|
||||
lexerror(ls, "chunk has too many lines", 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue