apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r290387 - /apr/apr/trunk/network_io/unix/sockaddr.c
Date Tue, 20 Sep 2005 07:40:00 GMT
Author: martin
Date: Tue Sep 20 00:39:57 2005
New Revision: 290387

URL: http://svn.apache.org/viewcvs?rev=290387&view=rev
Log:
When converting V4MAPPED IPv6 addresses to IPv4 (by dropping the
leading "::ffff:"), be sure to also copy the trailing NIL character,
or we'll end up with strings like "172.25.124.236124.236" (note the
appended "124.236").

Modified:
    apr/apr/trunk/network_io/unix/sockaddr.c

Modified: apr/apr/trunk/network_io/unix/sockaddr.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/network_io/unix/sockaddr.c?rev=290387&r1=290386&r2=290387&view=diff
==============================================================================
--- apr/apr/trunk/network_io/unix/sockaddr.c (original)
+++ apr/apr/trunk/network_io/unix/sockaddr.c Tue Sep 20 00:39:57 2005
@@ -114,7 +114,7 @@
          * IPv4 format.
          */
         memmove(buf, buf + strlen("::ffff:"),
-                strlen(buf + strlen("::ffff:")));
+                strlen(buf + strlen("::ffff:"))+1);
     }
 #endif
     /* ensure NUL termination if the buffer is too short */



Mime
View raw message