Roberto Ierusalimschy e3716ee161 Fix in string.rep
The cast of n (number of repetitions) to size_t may truncate its value,
causing a buffer overflow later. Better to check the buffer size
using lua_Integer, as all string lengths must fit in a lua_Integer and
n already is a lua_Integer. If everything fits in MAX_SIZE, then we can
safely convert n to size_t and compute the buffer size as a size_t.

As a corner case, n can be larger than size_t if the strings being
repeated have length zero, but in this case it will be multiplied by
zero, so an overflow in the cast is irrelevant.
2025-07-23 18:12:53 -03:00
2025-07-15 14:40:27 -03:00
2025-04-03 15:31:22 -03:00
2025-02-28 15:48:45 -03:00
2025-04-17 14:58:55 -03:00
2025-06-13 14:08:38 -03:00
2025-07-07 15:02:09 -03:00
2020-09-03 09:52:43 -03:00
2025-05-16 15:20:32 -03:00
2025-07-01 10:57:02 -03:00
2025-06-12 11:15:09 -03:00
2025-03-27 12:38:29 -03:00
2025-01-06 12:41:39 -03:00
2024-06-20 14:46:06 -03:00
2025-04-03 12:56:52 -03:00
2020-04-23 14:48:15 -03:00
2025-05-08 15:18:57 -03:00
2025-07-15 14:40:27 -03:00
2025-07-15 14:40:27 -03:00
2024-09-06 14:35:04 -03:00
2020-04-23 14:48:15 -03:00
2020-04-23 14:48:15 -03:00
2025-06-12 11:15:09 -03:00
2025-07-15 14:40:27 -03:00
2025-07-15 14:40:27 -03:00
2025-07-23 18:12:53 -03:00
2025-07-15 14:40:27 -03:00
2025-07-01 10:57:02 -03:00
2024-07-27 13:32:59 -03:00
2024-07-27 13:32:59 -03:00
2025-07-01 10:57:02 -03:00
2025-07-07 15:02:09 -03:00
2025-07-18 16:10:28 -03:00
2025-01-16 11:51:16 -03:00
2024-06-20 13:43:33 -03:00
2024-07-27 13:32:59 -03:00
2025-01-14 16:24:46 -03:00
2023-03-09 11:12:11 -03:00
2020-12-02 15:13:13 -03:00

Lua

This is the repository of Lua development code, as seen by the Lua team. It contains the full history of all commits but is mirrored irregularly. For complete information about Lua, visit Lua.org.

Please do not send pull requests. To report issues, post a message to the Lua mailing list.

Download official Lua releases from Lua.org.

Description
A copy of the Lua development repository, as seen by the Lua team. Mirrored irregularly. Please DO NOT send pull requests or any other stuff. All communication should be through the Lua mailing list https://www.lua.org/lua-l.html
Readme 17 MiB
Languages
C 67%
Lua 32.4%
Makefile 0.6%