RFR: JDK-8262472: Buffer overflow in UNICODE::as_utf8 for zero length output buffer [v2]
Ioi Lam
iklam at openjdk.java.net
Mon Mar 1 21:24:42 UTC 2021
On Mon, 1 Mar 2021 05:28:08 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> 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.
>
> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
>
> assert instead
LGTM
-------------
Marked as reviewed by iklam (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/2753
More information about the hotspot-dev
mailing list