diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-12-14 13:12:01 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-12-14 13:12:01 -0200 |
commit | 57f5b81da9f1f23380d20f164012e10c5f4fef94 (patch) | |
tree | f626d12697bfec8bba9290a0f11b29f71705eaab /lmem.c | |
parent | fdc25a1ebfe9968dcec390dd556375105aa0be40 (diff) | |
download | lua-57f5b81da9f1f23380d20f164012e10c5f4fef94.tar.gz lua-57f5b81da9f1f23380d20f164012e10c5f4fef94.tar.bz2 lua-57f5b81da9f1f23380d20f164012e10c5f4fef94.zip |
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.)
Diffstat (limited to 'lmem.c')
0 files changed, 0 insertions, 0 deletions