RFR: JDK-8312612: handle WideCharToMultiByte return values [v2]
Christoph Langer
clanger at openjdk.org
Fri Jul 28 11:35:50 UTC 2023
On Fri, 28 Jul 2023 09:58:01 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> The function WideCharToMultiByte is used at a number of places of the JDK codebase for conversion purposes.
>> Unfortunately, the function might fail because of various reasons, so the return value must be checked to avoid undefined behavior or even crashes.
>> see
>> https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte
>> especially
>> https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte#return-value
>>
>> At most places in the coding the return values are already checked, but some are missing.
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>
> small adjustments
Even better.
-------------
Marked as reviewed by clanger (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/15015#pullrequestreview-1551930333
More information about the client-libs-dev
mailing list