Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when parsing huge exponents #55

Closed
nst opened this issue May 22, 2017 · 3 comments
Closed

Crash when parsing huge exponents #55

nst opened this issue May 22, 2017 · 3 comments
Assignees
Labels

Comments

@nst
Copy link

nst commented May 22, 2017

json-swift does crash while parsing file i_number_huge_exp.json with fatal error: Double value cannot be converted to Int because the result would be greater than Int.max

@nst nst changed the title Crash Crash when parsing huge exponents May 22, 2017
@owensd
Copy link
Owner

owensd commented May 22, 2017

I haven't taken a look at any of the i_* files. But good catch. I also need to do more validation with your transform set.

@nst
Copy link
Author

nst commented May 22, 2017

The result of parsing the i_* files is... undefined, but the lib should return an error instead of crashing.

FYI here is the result of the whole JSONTestSuite for json-swift.

screen shot 2017-05-22 at 22 30 43

@owensd
Copy link
Owner

owensd commented May 22, 2017

Oh definitely, it shouldn't crash.

@owensd owensd added the bug label May 22, 2017
@owensd owensd self-assigned this May 22, 2017
@owensd owensd closed this as completed May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants