8017271: Crash may occur in java.net.DualStackPlainSocketImpl::initIDs due to unchecked values returned from JNI functions
Reviewed-by: alanb, khazra
This commit is contained in:
parent
feace4506d
commit
a294d4b6a4
@ -50,7 +50,7 @@
|
||||
#ifndef IP_MULTICAST_ALL
|
||||
#define IP_MULTICAST_ALL 49
|
||||
#endif
|
||||
#endif // __linux__`
|
||||
#endif // __linux__
|
||||
|
||||
#ifndef IPTOS_TOS_MASK
|
||||
#define IPTOS_TOS_MASK 0x1e
|
||||
|
@ -43,6 +43,7 @@ JNIEXPORT void JNICALL Java_java_net_DualStackPlainSocketImpl_initIDs
|
||||
(JNIEnv *env, jclass clazz) {
|
||||
|
||||
jclass cls = (*env)->FindClass(env, "java/net/InetSocketAddress");
|
||||
CHECK_NULL(cls);
|
||||
isa_class = (*env)->NewGlobalRef(env, cls);
|
||||
isa_ctorID = (*env)->GetMethodID(env, cls, "<init>",
|
||||
"(Ljava/net/InetAddress;I)V");
|
||||
|
Loading…
Reference in New Issue
Block a user