JDK-8262472: Buffer overflow in UNICODE::as_utf8 for zero length output buffer #2753
This one is trivial and probably inconsequential, but lets fix it anyway.
There is a buffer overflow in both variants of UNICODE::as_utf8, where in case of truncation due to a zero length output buffer the terminating zero still gets written.
Added fix + gtest. Ran gtest.
The text was updated successfully, but these errors were encountered:
okay, I changed it to an assert. I looked at the callers and think this should be okay, but I am not perfectly sure. Lets hope we hit all cases with our tests.
@tstuefe This change now passes all automated pre-integration checks.
After integration, the commit message for the final commit will be:
At the time when this comment was updated there had been 24 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
@tstuefe Since your change was applied there have been 30 commits pushed to the
Your commit was automatically rebased without conflicts.
Pushed as commit f5ab7f6.