Skip to content

Fix issue 464: Add multiple checking condition to avoid IOOBE #465

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

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

arthurscchan
Copy link
Contributor

@arthurscchan arthurscchan commented Jan 18, 2024

This PR provides a suggested fix for #464 by adding multiple checking conditions for the array index and buffer length in the CBORParser::_finishShortText() method to avoid malformed length value (negative value or value too large) causing infinite while loop and result in AIOOBE.

@cowtowncoder
Copy link
Member

Thank you @arthurscchan ! I tweaked this a bit, finding the root cause (int overflow when calculating amount of input/output space needed).

@cowtowncoder cowtowncoder merged commit 1f8c519 into FasterXML:2.17 Jan 18, 2024
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.

2 participants