# HG changeset patch # User chegar # Date 1371885294 -3600 # Node ID 1f637992378a11e562f58e7dbeedb4907d516424 # Parent cc30fa6fcf7cb4a4e989c9f3e8644af184f1e40d 8017271: Crash may occur in java.net.DualStackPlainSocketImpl::initIDs due to unchecked values returned from JNI functions Reviewed-by: alanb, khazra diff -r cc30fa6fcf7c -r 1f637992378a jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c --- a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c Fri Jun 21 13:42:55 2013 -0700 +++ b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c Sat Jun 22 08:14:54 2013 +0100 @@ -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 diff -r cc30fa6fcf7c -r 1f637992378a jdk/src/windows/native/java/net/DualStackPlainSocketImpl.c --- a/jdk/src/windows/native/java/net/DualStackPlainSocketImpl.c Fri Jun 21 13:42:55 2013 -0700 +++ b/jdk/src/windows/native/java/net/DualStackPlainSocketImpl.c Sat Jun 22 08:14:54 2013 +0100 @@ -43,6 +43,7 @@ (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, "", "(Ljava/net/InetAddress;I)V");