aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2025-10-29 22:35:41 -0400
committerGitHub <noreply@github.com>2025-10-30 10:35:41 +0800
commit35bac3c9741af54d121a8ef4e04ff20755943444 (patch)
tree4322865a6ba0c944c77a568157cd962dc1aa7b6c /lua
parentcd944c13a94713a984c4593fc3639e49ae59b91d (diff)
downloadlua-cjson-master.tar.gz
lua-cjson-master.tar.bz2
lua-cjson-master.zip
bugfix: fix truncation of decoded numbers outside lua_Integer's range (#116)HEADmaster
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 <jamessan@jamessan.com>
Diffstat (limited to 'lua')
0 files changed, 0 insertions, 0 deletions