The method ckAssertReturnValueOK will invoke ckAssertReturnValueOK2 which makes 
multiple calls to JNI functions, such as FindClass or GetMethodID. These calls 
would be unsafe as there may be a pending exception at this time.
So adding exception check to return immediately and do not call any further JNI 
functions when there is exception pending.

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

Commit messages:
 - 8367024: JNI exception pending in 
Java_sun_security_pkcs11_wrapper_PKCS11_C_1DeriveKey of p11_keymgmt.c:950

Changes: https://git.openjdk.org/jdk/pull/29054/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29054&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8367024
  Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/29054.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29054/head:pull/29054

PR: https://git.openjdk.org/jdk/pull/29054

Reply via email to