summaryrefslogtreecommitdiff
path: root/src/lj_lex.c
diff options
context:
space:
mode:
authorMike Pall <mike>2019-12-08 19:35:25 +0100
committerMike Pall <mike>2019-12-08 19:35:25 +0100
commit16e5605eec2e3882d709c6b123a644f6a8023945 (patch)
treef48838fc68c88f698583838e83afd39b41cb2671 /src/lj_lex.c
parente0388e6c00866c9ee1c7c9aab8a3ba9e15186b5c (diff)
downloadluajit2-16e5605eec2e3882d709c6b123a644f6a8023945.tar.gz
Prevent integer overflow while parsing long strings.
Diffstat (limited to 'src/lj_lex.c')
-rw-r--r--src/lj_lex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_lex.c b/src/lj_lex.c
index 36603168..1d063f8f 100644
--- a/src/lj_lex.c
+++ b/src/lj_lex.c
@@ -140,7 +140,7 @@ static int skip_sep(LexState *ls)
int s = ls->current;
lua_assert(s == '[' || s == ']');
save_and_next(ls);
- while (ls->current == '=') {
+ while (ls->current == '=' && count < 0x20000000) {
save_and_next(ls);
count++;
}