You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
common: json_to_s64 and json_to_double still accept hex, octal and signs #9377
#9150 routed json_to_u64() through the new str_to_u64(), which accepts strict decimal only. json_to_s64() and json_to_double() still use strtoll/strtod with base 0, so they accept hex (0x...), octal, and a leading +/-, none of which are valid JSON numbers. u64 is now asymmetric with the other two.
Note the u64 change already altered one case: "010" used to parse as 8 (base-0 octal) and now parses as 10. Correct per JSON, but worth being aware of when tightening the others.
No urgency, this has been the parsing behaviour for a long time.
changed the title [-]Tighten `json_to_s64`, `json_to_double`[/-][+]common: json_to_s64 and json_to_double still accept hex, octal and signs[/+]on Aug 4, 2026
Activity
[-]Tighten `json_to_s64`, `json_to_double`[/-][+]common: json_to_s64 and json_to_double still accept hex, octal and signs[/+]Aishagojo commentedon Sep 24, 2026
@nGoline! I noticed PR #9421 was linked to this issue a while ago. Is that PR still active, or is this issue open for a new contributor to take on?
common: reject non-JSON numbers in json_to_s64 and json_to_double