Prevent integer overflow while parsing long strings.
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user