On Thu, 30 Jul 2026 12:49:24 GMT, Matthias Baesken <[email protected]> wrote:

> [JDK-8388872](https://bugs.openjdk.org/browse/JDK-8388872) fixed some issues 
> in the windows pkcs11 native coding, but seems they are also present in the 
> separate unix coding.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

While comparing windows and unix coding I noticed this
`const char *libraryNameStr = (*env)->GetStringUTFChars(env, ...`
NULL-checks the return value on unix
https://github.com/openjdk/jdk/blob/76f9490a5537eb6ee3542da436a02883a02ed969/src/jdk.crypto.cryptoki/unix/native/libj2pkcs11/p11_md.c#L98

while this is missing on windows 
https://github.com/openjdk/jdk/blob/76f9490a5537eb6ee3542da436a02883a02ed969/src/jdk.crypto.cryptoki/windows/native/libj2pkcs11/p11_md.c#L92


Should we do it on windows too? If so, in this PR or do it separately ?

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

PR Comment: https://git.openjdk.org/jdk/pull/32103#issuecomment-5131223372

Reply via email to