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

JSON.sh does crash when parsing numerous nested structures #47

Open
nst opened this issue Oct 18, 2016 · 1 comment
Open

JSON.sh does crash when parsing numerous nested structures #47

nst opened this issue Oct 18, 2016 · 1 comment

Comments

@nst
Copy link

nst commented Oct 18, 2016

Step to reproduce

$ python -c "print('['*100000)" | ./JSON.sh 

Expected behaviour

JSON.sh should either parse the string, or return an error.

Actual behaviour

./JSON.sh: line 206: 40694 Done                    tokenize
40695 Segmentation fault: 11  | parse

JSON.sh does crash because it lacks a nesting limit.

@dominictarr
Copy link
Owner

I don't think we could have a nesting limit, other than exiting when it was reached, because even if you wanted to scan and not parse things beneath the limit, you'd still need to make sure the brackets balanced.

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

No branches or pull requests

2 participants