From b9705263ec8ffdcc001ba2702b153cc9fa94e3e7 Mon Sep 17 00:00:00 2001 From: Chris Phillips Date: Mon, 31 Mar 2008 13:27:10 -0700 Subject: [PATCH] 6469580: 1.5.0_08 JVM crashes in SignatureHandlerLibrary::add on Fujitsu Primepower platform Reviewed-by: andreas, valeriep, wetmore --- jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c b/jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c index 40c38e0640f..ea46ea59c9a 100644 --- a/jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c +++ b/jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c @@ -123,7 +123,10 @@ JNIEXPORT void JNICALL Java_sun_security_pkcs11_wrapper_PKCS11_connect C_GetFunctionList = (CK_C_GetFunctionList) dlsym(hModule, getFunctionListStr); (*env)->ReleaseStringUTFChars(env, jGetFunctionList, getFunctionListStr); } - if ((C_GetFunctionList == NULL) || ((systemErrorMessage = dlerror()) != NULL)){ + if (C_GetFunctionList == NULL) { + throwIOException(env, "ERROR: C_GetFunctionList == NULL"); + return; + } else if ( (systemErrorMessage = dlerror()) != NULL ){ throwIOException(env, systemErrorMessage); return; }