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
Oj.load second argument unconditionally assumes hash #254
Comments
I'll get that fixed this week. |
@ohler55 cool. although not a crasher (and not this reported issue) I think you also do some manual checks for T_FIXNUM and then follow up with a second Check_Type in a couple of places. I think with Check_Type second it is redundant (if it was before it might to_int -- I don't recall offhand). |
I'll look for those. No need to do the check twice. |
Please check the latest version on github. If it looks good I will make a release. |
@ohler55 yeah I only noticed the two missing hash checks and have not seen any others. |
Try it with the latest 2.12.13 release. |
ruby -roj -e 'Oj.load("sss", nil)'
Glancing at the code and this is just missing a Check_Type (or rb_check_type). Actually, the check is in other functions:
load_file is also missing this check.
The text was updated successfully, but these errors were encountered: