-
Notifications
You must be signed in to change notification settings - Fork 7.9k
QA - json_decode - max depth allowed #9359
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
Conversation
That is mostly expected behavior. Testing this Anyhow, the error message is off by one (should be "less than or equal to"), and there is no need for this check on 32bit systems at all; zend_range_check.h has some macros which support such range checks; in this case And we need to document the range limit (0 < depth <= INT_MAX) in the manual. PS: docs fixed |
Should we close this PR? Should I fix something in the core? (like depth >= INT_MAX) ? |
I think this PR is good (unless that code path is already tested), but the test needs to be skipped on 32bit architectures. If you like, you can provide a PR regarding the implementation of the function. |
lets see how can I improve all this. |
Just found this: ext/json/tests/bug72787.phpt Luckly, there is already a test for that in json_decode() and I will use the same SKIP Rule in my test for is_json() RFC |
No description provided.