Bug: Long brackets with a huge number of '=' causes overflow · lua/lua@57f5b81 · GitHub
Skip to content

Commit 57f5b81

Browse files
committed
Bug: Long brackets with a huge number of '=' causes overflow
A long bracket with too many equal signs can overflow the 'int' used for the counting and some arithmetic done on the value. Changing the counter to 'size_t' avoids that. (Because what is counted goes to a buffer, an overflow in the counter will first raise a buffer-overflow error.)
1 parent fdc25a1 commit 57f5b81

2 files changed

Lines changed: 35 additions & 14 deletions

File tree

‎bugs‎

Lines changed: 19 additions & 0 deletions

‎llex.c‎

Lines changed: 16 additions & 14 deletions

0 commit comments

Comments
 (0)