Skip to content

Fixing out of range crash#109

Open
zackcam wants to merge 1 commit into
valkey-io:unstablefrom
zackcam:Out-of-range
Open

Fixing out of range crash#109
zackcam wants to merge 1 commit into
valkey-io:unstablefrom
zackcam:Out-of-range

Conversation

@zackcam
Copy link
Copy Markdown
Contributor

@zackcam zackcam commented Jun 5, 2026

Fix for: #105

This fix uses the suggested change of switching to strtod. As this will convert overflows to inf, and not just throw an error. This library still works on subnormal values as well. We do not need an extra check for ERANGE from what I could tell as we are covered by the inf check in JSONUTIL_ADDITION_OVERFLOW

Two new tests are created the one in dom checks for three different cases, normal + subnormal, subnormal + normal then an overflow check.

Signed-off-by: zackcam <zackcam@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant