mirror of
https://github.com/lua/lua.git
synced 2026-06-07 23:53:48 +00:00
Bug: Constructors with nils can overflow counters
This commit is contained in:
@@ -940,6 +940,8 @@ static void constructor (LexState *ls, expdesc *t) {
|
||||
if (ls->t.token == '}') break;
|
||||
closelistfield(fs, &cc);
|
||||
field(ls, &cc);
|
||||
checklimit(fs, cc.tostore + cc.na + cc.nh, INT_MAX/2,
|
||||
"items in a constructor");
|
||||
} while (testnext(ls, ',') || testnext(ls, ';'));
|
||||
check_match(ls, '}', '{', line);
|
||||
lastlistfield(fs, &cc);
|
||||
|
||||
Reference in New Issue
Block a user