aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-02-09 15:57:45 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-02-09 15:57:45 -0200
commit7e425be975c7c5bedff234a0daeb803131ddfc60 (patch)
tree6ef635e5b02dddd4ef4b592deca668bc45779907
parent0705e7b39f29ad140c2c0deb01ee5d4706f77636 (diff)
downloadlua-7e425be975c7c5bedff234a0daeb803131ddfc60.tar.gz
lua-7e425be975c7c5bedff234a0daeb803131ddfc60.tar.bz2
lua-7e425be975c7c5bedff234a0daeb803131ddfc60.zip
bug (in 5.2): Chunk with too many lines can seg. fault
-rw-r--r--bugs28
1 files changed, 26 insertions, 2 deletions
diff --git a/bugs b/bugs
index 67da6d14..0d0c3b25 100644
--- a/bugs
+++ b/bugs
@@ -1880,8 +1880,8 @@ patch = [[
1880+++ lundump.c 2008/04/04 19:51:41 2.7.1.4 1880+++ lundump.c 2008/04/04 19:51:41 2.7.1.4
1881@@ -1,5 +1,5 @@ 1881@@ -1,5 +1,5 @@
1882 /* 1882 /*
1883-** $Id: bugs,v 1.132 2014/05/07 16:57:27 roberto Exp roberto $ 1883-** $Id: bugs,v 1.133 2014/09/01 16:56:01 roberto Exp roberto $
1884+** $Id: bugs,v 1.132 2014/05/07 16:57:27 roberto Exp roberto $ 1884+** $Id: bugs,v 1.133 2014/09/01 16:56:01 roberto Exp roberto $
1885 ** load precompiled Lua chunks 1885 ** load precompiled Lua chunks
1886 ** See Copyright Notice in lua.h 1886 ** See Copyright Notice in lua.h
1887 */ 1887 */
@@ -3248,6 +3248,30 @@ patch = [[
3248]] 3248]]
3249} 3249}
3250 3250
3251Bug{
3252what = [[Chunk with too many lines can seg. fault]],
3253report = [[Roberto, 2014/11/14]],
3254since = [[5.1 (at least)]],
3255fix = nil,
3256example = [[
3257-- the cause of the bug is the use of an unitialized variable, so
3258-- it cannot be reproduced reliably
3259local s = string.rep("\n", 2^24)
3260print(load(function () return s end))
3261]],
3262patch = [[
3263--- llex.c 2013/08/30 15:49:41 2.63.1.2
3264+++ llex.c 2015/02/09 17:05:31
3265@@ -153,5 +153,5 @@
3266 next(ls); /* skip `\n\r' or `\r\n' */
3267 if (++ls->linenumber >= MAX_INT)
3268- luaX_syntaxerror(ls, "chunk has too many lines");
3269+ lexerror(ls, "chunk has too many lines", 0);
3270 }
3271
3272]]
3273}
3274
3251 3275
3252--[=[ 3276--[=[
3253Bug{ 3277Bug{