提交 e25fb1c8 编写于 作者: C chegar

8017271: Crash may occur in java.net.DualStackPlainSocketImpl::initIDs due to...

8017271: Crash may occur in java.net.DualStackPlainSocketImpl::initIDs due to unchecked values returned from JNI functions
Reviewed-by: alanb, khazra
上级 279a03b9
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册