Description
Currently, the Java side keeps a reference to the address of the EVP context, and checks that it's not 0 before performing any operations.
But if an error happens in native code, for example here in init():
if (result == 0 && context != NULL) { if (CONTEXT(ctx) != NULL) { dlsym_EVP_CIPHER_CTX_cleanup(context); } else { dlsym_EVP_CIPHER_CTX_free(context); } }
The address known to the Java side will now be invalid, and if any native method is now called the JVM will crash.