Re: [cp-patches] FYI: add offset to memcpy operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oh and here is the patch.

cya
Robert

Robert Schuster schrieb:
> Hi,
> the memcpy operation in gnu_java_nio_VMChannel.c::getsockname() for the
> IPv6 case was copying the port value into the same space as the IPv6
> address. I fixed this by adding an offset (like its done in the IPv4 case).
> 
> ChangeLog:
> 
> 2006-11-09  Robert Schuster  <robertschuster@xxxxxxxx>
> 
>         * native/jni/java-nio/gnu_java_nio_VMChannel.c:
>         (getsockname): Added 16 byte offset to memcpy operation.
> 
> cya
> Robert
> 
Index: native/jni/java-nio/gnu_java_nio_VMChannel.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/java-nio/gnu_java_nio_VMChannel.c,v
retrieving revision 1.7
diff -u -r1.7 gnu_java_nio_VMChannel.c
--- native/jni/java-nio/gnu_java_nio_VMChannel.c	25 Oct 2006 00:33:26 -0000	1.7
+++ native/jni/java-nio/gnu_java_nio_VMChannel.c	9 Nov 2006 11:10:22 -0000
@@ -1272,7 +1272,7 @@
     {
       addr6 = (struct sockaddr_in6 *) sockaddr;
       memcpy (nameptr, &(addr6->sin6_addr.s6_addr), 16);
-      memcpy (nameptr, &(addr6->sin6_port), 2);
+      memcpy (nameptr + 16, &(addr6->sin6_port), 2);
       return 16;
     }
 #endif /* HAVE_INET6 */

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux