<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lua-cjson/lua_cjson.c, branch or-1.31.0</title>
<subtitle>A mirror of https://github.com/openresty/lua-cjson
</subtitle>
<id>https://git.lua4.win/lua-cjson/atom?h=or-1.31.0</id>
<link rel='self' href='https://git.lua4.win/lua-cjson/atom?h=or-1.31.0'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/'/>
<updated>2026-02-10T01:08:52+00:00</updated>
<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>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>
<entry>
<title>feature: Lua 5.3 + 5.4 integer support, with CI and conflicts fixed.</title>
<updated>2024-06-11T01:39:55+00:00</updated>
<author>
<name>Hisham Muhammad</name>
<email>hisham@gobolinux.org</email>
</author>
<published>2024-06-11T01:39:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=c92ecda53337490633c95e6ae00e322dc9ad1fb8'/>
<id>urn:sha1:c92ecda53337490633c95e6ae00e322dc9ad1fb8</id>
<content type='text'>
Co-Authored-By: Hisham Muhammad &lt;hisham@gobolinux.org&gt;
Co-authored-by: Mark Pulford &lt;mark@kyne.com.au&gt;
Co-authored-by: ichenq &lt;ichenq@gmail.com&gt;
Co-authored-by: Cloud Wu &lt;cloudwu@gmail.com&gt;
Co-authored-by: caijietao &lt;t0350.prog@gmail.com&gt;
Co-authored-by: actboy168 &lt;actboy168@gmail.com&gt;
Co-authored-by: wudeng &lt;wudeng256@gmail.com&gt;
Co-authored-by: caiyiheng &lt;rangercyh@qq.com&gt;</content>
</entry>
<entry>
<title>bugfix: bus error or SIGSEGV caused by encode not keep buffer.</title>
<updated>2024-03-01T01:18:48+00:00</updated>
<author>
<name>hyw0810</name>
<email>1210612004@qq.com</email>
</author>
<published>2024-03-01T01:18:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=d20576d5cef3d7aa3b6d62db7aee9d9d5f03cc70'/>
<id>urn:sha1:d20576d5cef3d7aa3b6d62db7aee9d9d5f03cc70</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Bugfix: Lua cjson integer overflow issues (CVE-2022-24834) (#94)</title>
<updated>2023-07-20T15:47:32+00:00</updated>
<author>
<name>lijunlong</name>
<email>lijunlong@openresty.com</email>
</author>
<published>2023-07-20T15:47:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=2bfad8f5eeb821357d2ada29506e864ff7ec947e'/>
<id>urn:sha1:2bfad8f5eeb821357d2ada29506e864ff7ec947e</id>
<content type='text'>
* Fix integer overflows due to using wrong integer size.
* Add assertions / panic when overflow still happens.

Co-authored-by: Oran Agra &lt;oran@redislabs.com&gt;
Co-authored-by: Yossi Gottlieb &lt;yossigo@gmail.com&gt;</content>
</entry>
<entry>
<title>feature: Add option to skip invalid value types. </title>
<updated>2023-02-22T03:28:15+00:00</updated>
<author>
<name>lijunlong</name>
<email>lijunlong@openresty.com</email>
</author>
<published>2023-02-22T03:28:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=de93a78d3002ee72bb1c7e3a629d67e19623a4ae'/>
<id>urn:sha1:de93a78d3002ee72bb1c7e3a629d67e19623a4ae</id>
<content type='text'>
Co-authored-by: Jesper Lundgren &lt;jesperlundgren@exosite.com&gt;</content>
</entry>
<entry>
<title>bumped version to 2.1.0.11. (#86)</title>
<updated>2023-01-19T07:33:23+00:00</updated>
<author>
<name>Johnny Wang</name>
<email>wangjiahao@openresty.com</email>
</author>
<published>2023-01-19T07:33:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=6f38a95a2d44ad3bd4cc49e14224296239da7412'/>
<id>urn:sha1:6f38a95a2d44ad3bd4cc49e14224296239da7412</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bugfix: empty_array can not work on Apple because csjon did not compare light userdata address with masked address (#82)</title>
<updated>2022-01-13T00:47:48+00:00</updated>
<author>
<name>Datong Sun</name>
<email>dndx@idndx.com</email>
</author>
<published>2022-01-13T00:47:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=92cebdcc374a7bb4bf59e1186076433e45cc1138'/>
<id>urn:sha1:92cebdcc374a7bb4bf59e1186076433e45cc1138</id>
<content type='text'>
Since we used `json_lightudata_mask` when creating lightuserdata, same
mask should be applied when comparing the return of `touserdata`

Fixes #81.</content>
</entry>
</feed>
