On Fri, 2 Aug 2024 18:20:40 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> The first call to `WideCharToMultiByte()` returns the required size for the 
>> multibyte buffer. When it returns 0, `exit(1)` is issued inside 
>> `JLI_MemAlloc()`. If the second call to `WideCharToMultiByte()` returns 0, 
>> it is explicitly dealt with the patch which also issues `exit(1)`.
>
>> The first call to `WideCharToMultiByte()` returns the required size for the 
>> multibyte buffer. When it returns 0, `exit(1)` is issued inside 
>> `JLI_MemAlloc()`.
> 
> That's a bit subtle. I think it needs to be handled here or at least include 
> a comment to say that it returns 0 on error which will cause JLI_MemAlloc to 
> exit.

OK, added the comment

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20428#discussion_r1702193100

Reply via email to