8000 Integer overflow in Writer::WriteString · Issue #2336 · Tencent/rapidjson · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Integer overflow in Writer::WriteString #2336

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

Open
gitmodimo opened this issue Apr 9, 2025 · 0 comments 6FFA
Open

Integer overflow in Writer::WriteString #2336

gitmodimo opened this issue Apr 9, 2025 · 0 comments

Comments

@gitmodimo
Copy link

A bit of an edge case but I have encountered integer overflow in Writer::WriteString.
With sufficiently big length (eg. 762743664) the calculation of PutReserve argument overflows and leads to memory corruption later on.
I think strings with length above certain threshold should be written in chunks. That would prevent overeager memory allocation in usual case where there are little to none special/unicode characters.

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

1 participant
0