From ba0e2b5f82c12f1d6ed728c513c10e71e48e118b Mon Sep 17 00:00:00 2001 From: msheppar Date: Wed, 25 Feb 2015 19:36:29 +0000 Subject: [PATCH] 8046901: Check jdk/src/solaris/native/sun/nio for Parfait flagged uninitialized memory Reviewed-by: rriggs, alanb --- src/solaris/native/sun/nio/ch/DatagramChannelImpl.c | 2 +- src/solaris/native/sun/nio/ch/ServerSocketChannelImpl.c | 2 +- src/solaris/native/sun/nio/ch/sctp/SctpNet.c | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c b/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c index f5dd361c4..bf7d578f8 100644 --- a/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c +++ b/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c @@ -201,7 +201,7 @@ Java_sun_nio_ch_DatagramChannelImpl_receive0(JNIEnv *env, jobject this, } if (senderAddr == NULL) { jobject isa = NULL; - int port; + int port = 0; jobject ia = NET_SockaddrToInetAddress(env, (struct sockaddr *)&sa, &port); if (ia != NULL) { isa = (*env)->NewObject(env, isa_class, isa_ctorID, ia, port); diff --git a/src/solaris/native/sun/nio/ch/ServerSocketChannelImpl.c b/src/solaris/native/sun/nio/ch/ServerSocketChannelImpl.c index e96c9b0cc..04a400a5d 100644 --- a/src/solaris/native/sun/nio/ch/ServerSocketChannelImpl.c +++ b/src/solaris/native/sun/nio/ch/ServerSocketChannelImpl.c @@ -84,7 +84,7 @@ Java_sun_nio_ch_ServerSocketChannelImpl_accept0(JNIEnv *env, jobject this, int alloc_len; jobject remote_ia = 0; jobject isa; - jint remote_port; + jint remote_port = 0; NET_AllocSockaddr(&sa, &alloc_len); if (sa == NULL) { diff --git a/src/solaris/native/sun/nio/ch/sctp/SctpNet.c b/src/solaris/native/sun/nio/ch/sctp/SctpNet.c index 6a5e2cbbb..9c3efc0cd 100644 --- a/src/solaris/native/sun/nio/ch/sctp/SctpNet.c +++ b/src/solaris/native/sun/nio/ch/sctp/SctpNet.c @@ -431,7 +431,7 @@ jobjectArray getRemoteAddresses paddr = addr_buf; for (i=0; i