<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lua-cjson, branch 2.1.0.19</title>
<subtitle>A mirror of https://github.com/openresty/lua-cjson
</subtitle>
<id>https://git.lua4.win/lua-cjson/atom?h=2.1.0.19</id>
<link rel='self' href='https://git.lua4.win/lua-cjson/atom?h=2.1.0.19'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/'/>
<updated>2026-06-28T11:38:40+00:00</updated>
<entry>
<title>bugfix: fix C99 for-loop declaration for GCC 4.8.5 C89 compatibility</title>
<updated>2026-06-28T11:38:40+00:00</updated>
<author>
<name>lijunlong</name>
<email>lijunlong@openresty.com</email>
</author>
<published>2026-06-28T11:38:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=5ce46a80b10ef9d380a45c9e6cff9ecffbe71ebb'/>
<id>urn:sha1:5ce46a80b10ef9d380a45c9e6cff9ecffbe71ebb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bugfix: setting encode_escape_forward_slash on a cjson instance does not affect other instances.</title>
<updated>2026-06-14T13:30:49+00:00</updated>
<author>
<name>SnowOnion</name>
<email>snowonionlee@gmail.com</email>
</author>
<published>2026-06-14T13:30:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=fa418dcac3de13c9fe2ddc997bd53e92d793f0bc'/>
<id>urn:sha1:fa418dcac3de13c9fe2ddc997bd53e92d793f0bc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bugfix: own a copy of the encode_indent string</title>
<updated>2026-06-07T12:39:00+00:00</updated>
<author>
<name>lijunlong</name>
<email>lijunlong@openresty.com</email>
</author>
<published>2026-06-07T06:23:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=b97100852940cd7cd0ee187326778fa7c911d92f'/>
<id>urn:sha1:b97100852940cd7cd0ee187326778fa7c911d92f</id>
<content type='text'>
json_cfg_encode_indent stored the raw luaL_checkstring pointer, which aliases a Lua string that can be garbage-collected, causing a use-after-free / heap info-leak on a later encode(). Store a malloc'd copy, freed on reset and in __gc.
</content>
</entry>
<entry>
<title>bumped versoin to 2.1.0.17.</title>
<updated>2026-05-06T13:23:33+00:00</updated>
<author>
<name>lijunlong</name>
<email>lijunlong@openresty.com</email>
</author>
<published>2026-05-06T13:23:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=617164a0fe3bb647128178f9caefb304b8573bb6'/>
<id>urn:sha1:617164a0fe3bb647128178f9caefb304b8573bb6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>optimize: rename cjson.decoce_allow_comments to cjson.decocde_allow_comment.</title>
<updated>2026-02-10T01:08:52+00:00</updated>
<author>
<name>lijunlong</name>
<email>lijunlong@openresty.com</email>
</author>
<published>2026-02-10T01:08:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=c305d55c7f321c01b4d135ef6d41879fd5f8e9f5'/>
<id>urn:sha1:c305d55c7f321c01b4d135ef6d41879fd5f8e9f5</id>
<content type='text'>
reslove two warnings and update the doc.
</content>
</entry>
<entry>
<title>feature: add option to allow comments in decode. </title>
<updated>2026-02-10T00:59:11+00:00</updated>
<author>
<name>skewb1k</name>
<email>skewb1kunix@gmail.com</email>
</author>
<published>2026-02-10T00:59:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=fed8c8356be4d94ceb55f2880bdb77fd9b55ef1e'/>
<id>urn:sha1:fed8c8356be4d94ceb55f2880bdb77fd9b55ef1e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feature: add option to indent encoded output.</title>
<updated>2026-01-19T00:51:57+00:00</updated>
<author>
<name>skewb1k</name>
<email>skewb1kunix@gmail.com</email>
</author>
<published>2026-01-19T00:51:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=ea05d06f5a56d94d423fc697561a33ca3b8bf085'/>
<id>urn:sha1:ea05d06f5a56d94d423fc697561a33ca3b8bf085</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed: worning for explicit pointer to int conversion.</title>
<updated>2026-01-19T00:44:59+00:00</updated>
<author>
<name>Deyan Dobromirov</name>
<email>dvdvideo123@gmail.com</email>
</author>
<published>2026-01-19T00:44:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=3c64e2247623a66347a48d66b6a791b58a71fdbe'/>
<id>urn:sha1:3c64e2247623a66347a48d66b6a791b58a71fdbe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bumped to to v2.1.0.16</title>
<updated>2026-01-19T00:17:26+00:00</updated>
<author>
<name>lijunlong</name>
<email>lijunlong@openresty.com</email>
</author>
<published>2026-01-19T00:17:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=e6daf3cdfac61055af3f7d88d9886942ff0de6e6'/>
<id>urn:sha1:e6daf3cdfac61055af3f7d88d9886942ff0de6e6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bugfix: fix truncation of decoded numbers outside lua_Integer's range (#116)</title>
<updated>2025-10-30T02:35:41+00:00</updated>
<author>
<name>James McCoy</name>
<email>jamessan@jamessan.com</email>
</author>
<published>2025-10-30T02:35:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=35bac3c9741af54d121a8ef4e04ff20755943444'/>
<id>urn:sha1:35bac3c9741af54d121a8ef4e04ff20755943444</id>
<content type='text'>
json_next_number_token stores the `long long` return value from `stroll`
in a `lua_Integer` (which is typically a typedef for `ptrdiff_t`).

On 32-bit platforms, this ends up storing an 8-byte number into a 4-byte
variable, truncating the value.

Instead, store the converted value in a temporary `long long` variable
so we can detect the scenario and decode into a `lua_Number`.

Signed-off-by: James McCoy &lt;jamessan@jamessan.com&gt;</content>
</entry>
</feed>
