From c816ca10db2d88936e5811763a0bf4d92896c409 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Fri, 7 Jan 2011 21:02:58 +0000 Subject: [PATCH] 7009760: Possible stack corruption in Java_java_net_TwoStacksPlainSocketImpl_socketGetOption SOCKET_ADDRESS -> SOCKETADDRESS Reviewed-by: alanb --- jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c b/jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c index 792fc251d35..71e2b2b124e 100644 --- a/jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c +++ b/jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c @@ -1032,21 +1032,20 @@ Java_java_net_TwoStacksPlainSocketImpl_socketGetOption(JNIEnv *env, jobject this * SO_BINDADDR isn't a socket option */ if (opt == java_net_SocketOptions_SO_BINDADDR) { - SOCKET_ADDRESS him; + SOCKETADDRESS him; int len; int port; jobject iaObj; jclass iaCntrClass; jfieldID iaFieldID; - len = sizeof(struct sockaddr_in); + len = sizeof(him); if (fd == -1) { /* must be an IPV6 only socket. Case where both sockets are != -1 * is handled in java */ fd = getFD1 (env, this); - len = sizeof(struct SOCKADDR_IN6); } if (getsockname(fd, (struct sockaddr *)&him, &len) < 0) {