You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: