summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-02-09 15:56:34 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-02-09 15:56:34 -0200
commitce74637ace147d147578a95c435cf7cafec590b8 (patch)
treed510203f6bb0342270ae9f0030926ab2b104526a
parent44be021309e1250bcef197537948514506ca8512 (diff)
downloadlua-ce74637ace147d147578a95c435cf7cafec590b8.tar.gz
lua-ce74637ace147d147578a95c435cf7cafec590b8.tar.bz2
lua-ce74637ace147d147578a95c435cf7cafec590b8.zip
bug: Chunk with too many lines can seg. fault
-rw-r--r--llex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/llex.c b/llex.c
index b1a714fa..9e830ecf 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 2.63.1.1 2013/04/12 18:48:47 roberto Exp roberto $ 2** $Id: llex.c,v 2.63.1.2 2013/08/30 15:49:41 roberto Exp roberto $
3** Lexical Analyzer 3** Lexical Analyzer
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -152,7 +152,7 @@ static void inclinenumber (LexState *ls) {
152 if (currIsNewline(ls) && ls->current != old) 152 if (currIsNewline(ls) && ls->current != old)
153 next(ls); /* skip `\n\r' or `\r\n' */ 153 next(ls); /* skip `\n\r' or `\r\n' */
154 if (++ls->linenumber >= MAX_INT) 154 if (++ls->linenumber >= MAX_INT)
155 luaX_syntaxerror(ls, "chunk has too many lines"); 155 lexerror(ls, "chunk has too many lines", 0);
156} 156}
157 157
158 158