RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits

Alexey Ivanov aivanov at openjdk.java.net
Fri Nov 19 20:53:10 UTC 2021


On Fri, 19 Nov 2021 20:21:27 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> I am not sure that the bad_alloc will be properly handled in this Java_sun_awt_shell_Win32ShellFolder2_getIconBits method.

I can't see any try-catch.
Is it better to use `malloc` and check for `NULL`?

> Probably it will be better to merge assigning into one line.

I agree. The line doesn't get too long.

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

PR: https://git.openjdk.java.net/jdk/pull/6473



More information about the client-libs-dev mailing list