<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lua/lutf8lib.c, branch v5.4.9</title>
<subtitle>A mirror of https://github.com/lua/lua
</subtitle>
<id>https://git.lua4.win/lua/atom?h=v5.4.9</id>
<link rel='self' href='https://git.lua4.win/lua/atom?h=v5.4.9'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/'/>
<updated>2026-07-22T18:07:52+00:00</updated>
<entry>
<title>Bug: shift overflow in utf-8 decode</title>
<updated>2026-07-22T18:07:52+00:00</updated>
<author>
<name>Roberto I</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2026-07-22T18:07:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=af19891bce064a625deeea0fa3d0005f6e22842a'/>
<id>urn:sha1:af19891bce064a625deeea0fa3d0005f6e22842a</id>
<content type='text'>
An initial byte \xFF will ask for 7 continuation bytes, and then the
shift by (count * 5) will try to shift 35 bits.
</content>
</entry>
<entry>
<title>Bug: 'utf8.codes' accepts spurious continuation bytes</title>
<updated>2022-09-23T13:41:16+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2022-09-23T13:41:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=a1089b415a3f5c753aa1b40758ffdaf28d5701b0'/>
<id>urn:sha1:a1089b415a3f5c753aa1b40758ffdaf28d5701b0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Avoid overflows when incrementing parameters in C</title>
<updated>2021-09-22T16:10:39+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2021-09-22T16:10:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=deac067ed39a44c001599c0d15de09872496b2aa'/>
<id>urn:sha1:deac067ed39a44c001599c0d15de09872496b2aa</id>
<content type='text'>
Any C function can receive maxinteger as an integer argument, and
therefore cannot increment it without some care (e.g., doing unsigned
arithmetic as the core does).
</content>
</entry>
<entry>
<title>Details (more uniformity in error messages)</title>
<updated>2020-05-27T14:46:47+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2020-05-27T14:46:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=aa8d4a782d88738b3ea921cde5a450656da8fa63'/>
<id>urn:sha1:aa8d4a782d88738b3ea921cde5a450656da8fa63</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Added 'simplesect' sections to the manual</title>
<updated>2020-04-13T16:42:40+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2020-04-13T16:42:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=9e0a8475cdd53af664b807c4f0c4d53088a7faf2'/>
<id>urn:sha1:9e0a8475cdd53af664b807c4f0c4d53088a7faf2</id>
<content type='text'>
'simplesect' encloses the introductory text of sections with
subsections, so that each section either is all text or is all
subsections. (This commit also corrects a small brace error in the
manual and extra spaces/tabs in some other files.)
</content>
</entry>
<entry>
<title>Added macro 'luaL_pushfail'</title>
<updated>2019-08-16T17:58:02+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-08-16T17:58:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=b96b0b5abbf40cbdbed7952bf35a5a27ddf75928'/>
<id>urn:sha1:b96b0b5abbf40cbdbed7952bf35a5a27ddf75928</id>
<content type='text'>
The macro 'luaL_pushfail' documents all places in the standard libraries
that return nil to signal some kind of failure. It is defined as
'lua_pushnil'. The manual also got a notation (@fail) to document those
returns. The tests were changed to be agnostic regarding whether 'fail'
is 'nil' or 'false'.
</content>
</entry>
<entry>
<title>A few changes in tests about number of bits in integers</title>
<updated>2019-05-13T19:17:21+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-05-13T19:17:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=279c3a6961c60252f0368fdea889caf977f85fe0'/>
<id>urn:sha1:279c3a6961c60252f0368fdea889caf977f85fe0</id>
<content type='text'>
- The preprocessor must work with at least 'long', and therefore must
do shifts of up to 31 bits correctly.
- Whenever possible, use unsigned types in shifts.
</content>
</entry>
<entry>
<title>Some improvements in 'luaconf.h'</title>
<updated>2019-05-13T17:24:10+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-05-13T17:24:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=49c42f3615bd876657bf697e3bf040ce796ae238'/>
<id>urn:sha1:49c42f3615bd876657bf697e3bf040ce796ae238</id>
<content type='text'>
Added '#if !defined' in some definitions to allow external definitions;
more comments; other small changes.
</content>
</entry>
<entry>
<title>Name 'nonstrict' in the UTF-8 library changed to 'lax'</title>
<updated>2019-03-19T14:15:49+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-03-19T14:15:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=39bb3cf2422603d854ee12529cc3419dc735802a'/>
<id>urn:sha1:39bb3cf2422603d854ee12529cc3419dc735802a</id>
<content type='text'>
It is not a good idea to use negative words to describe boolean
values. (When we negate that boolean we create a double negative...)
</content>
</entry>
<entry>
<title>Changes in the validation of UTF-8</title>
<updated>2019-03-15T16:14:17+00:00</updated>
<author>
<name>Roberto Ierusalimschy</name>
<email>roberto@inf.puc-rio.br</email>
</author>
<published>2019-03-15T16:14:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua/commit/?id=1e0c73d5b643707335b06abd2546a83d9439d14c'/>
<id>urn:sha1:1e0c73d5b643707335b06abd2546a83d9439d14c</id>
<content type='text'>
All UTF-8 encoding functionality (including the escape
sequence '\u') accepts all values from the original UTF-8
specification (with sequences of up to six bytes).

By default, the decoding functions in the UTF-8 library do not
accept invalid Unicode code points, such as surrogates. A new
parameter 'nonstrict' makes them accept all code points up to
(2^31)-1, as in the original UTF-8 specification.
</content>
</entry>
</feed>
