<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lua/lstrlib.c, branch v5.5.1</title>
<subtitle>A mirror of https://github.com/lua/lua
</subtitle>
<id>https://git.lua4.win/lua/atom?h=v5.5.1</id>
<link rel='self' href='https://git.lua4.win/lua/atom?h=v5.5.1'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/'/>
<updated>2026-04-01T18:01:58+00:00</updated>
<entry>
<title>Bug: wrong initialization in result from 'gmatch'</title>
<updated>2026-04-01T18:01:58+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2026-04-01T18:01:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=efddc2309c5ff8a1842bea8a9c0d7d4a5d6e1e60'/>
<id>urn:sha1:efddc2309c5ff8a1842bea8a9c0d7d4a5d6e1e60</id>
<content type='text'>
Function returned by 'string.gmatch' can be left in an inconsistent
state after an error.
</content>
</entry>
<entry>
<title>Special case for 'string.rep' over an empty string</title>
<updated>2026-01-04T19:39:22+00:00</updated>
<author>
<name>Roberto I</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2026-01-04T19:39:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=5cfc725a8b61a6f96c7324f60ac26739315095ba'/>
<id>urn:sha1:5cfc725a8b61a6f96c7324f60ac26739315095ba</id>
<content type='text'>
</content>
</entry>
<entry>
<title>BUG: Possible overflow in 'string.packsize'</title>
<updated>2026-01-04T19:31:17+00:00</updated>
<author>
<name>Roberto I</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2026-01-04T19:31:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=45c7ae5b1b05069543fe1710454c651350bc1c42'/>
<id>urn:sha1:45c7ae5b1b05069543fe1710454c651350bc1c42</id>
<content type='text'>
'string.packsize' can overflow result in 32-bit machines using 64-bit
integers, as LUA_MAXINTEGER may not fit into size_t.
</content>
</entry>
<entry>
<title>Details</title>
<updated>2025-12-23T17:44:06+00:00</updated>
<author>
<name>Roberto I</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2025-12-23T17:44:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=578ae5745cecee56d48795cd4ae1eaf13618715c'/>
<id>urn:sha1:578ae5745cecee56d48795cd4ae1eaf13618715c</id>
<content type='text'>
typo in comment + formatting + logical 'and' was written as a bitwise
operation (makes code more fragile)
</content>
</entry>
<entry>
<title>Small change in 'trymt'</title>
<updated>2025-10-18T13:34:42+00:00</updated>
<author>
<name>Roberto I</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2025-10-18T13:34:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=fca974486d12aa29bb6d731fdb5b25055157ece8'/>
<id>urn:sha1:fca974486d12aa29bb6d731fdb5b25055157ece8</id>
<content type='text'>
Operation name can be diferent from metamethod name.
</content>
</entry>
<entry>
<title>Fix in string.rep</title>
<updated>2025-07-23T21:12:53+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2025-07-23T21:12:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=e3716ee161bb5416b5eb846eff6039d61954cfbd'/>
<id>urn:sha1:e3716ee161bb5416b5eb846eff6039d61954cfbd</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Added missing casts from lua_Unsigned to size_t</title>
<updated>2025-07-01T19:07:03+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2025-07-01T19:07:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=03bf7fdd4f3a588cd7ff0a8c51ed68c596d3d575'/>
<id>urn:sha1:03bf7fdd4f3a588cd7ff0a8c51ed68c596d3d575</id>
<content type='text'>
size_t can be smaller than lua_Usigned.
</content>
</entry>
<entry>
<title>In gen. GC, some gray objects stay in gray lists</title>
<updated>2025-04-15T20:00:30+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2025-04-15T20:00:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=3dbb1a4b894c0744a331d4319d8d1704dc4ad943'/>
<id>urn:sha1:3dbb1a4b894c0744a331d4319d8d1704dc4ad943</id>
<content type='text'>
In generational collection, objects marked as touched1 stay in gray
lists between collections. This commit fixes a bug introduced in
commit 808976bb59.
</content>
</entry>
<entry>
<title>'-Wconversion' extended to all options of Lua numbers</title>
<updated>2024-07-27T18:13:21+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2024-07-27T18:13:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=f2206b2abe848f65956fa48da338c2bfac599e4a'/>
<id>urn:sha1:f2206b2abe848f65956fa48da338c2bfac599e4a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Added gcc option '-Wconversion'</title>
<updated>2024-07-27T16:32:59+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2024-07-27T16:32:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=0acd55898d0aaae8dbc14c8a1bc1e3bdffc8701b'/>
<id>urn:sha1:0acd55898d0aaae8dbc14c8a1bc1e3bdffc8701b</id>
<content type='text'>
No warnings for standard numerical types. Still pending alternative
numerical types.
</content>
</entry>
</feed>
