Bug. fill the complete IP-Address
authorPhilipp Tölke <toelke@in.tum.de>
Tue, 2 Aug 2011 07:34:51 +0000 (07:34 +0000)
committerPhilipp Tölke <toelke@in.tum.de>
Tue, 2 Aug 2011 07:34:51 +0000 (07:34 +0000)
src/vpn/gnunet-daemon-vpn.c

index 25fa04c9743718cc7c02694a1e6dc4b4fa848c74..1e1e957d8c6bfc89ac365f45fa2ec2753049046a 100644 (file)
@@ -453,7 +453,7 @@ new_ip4addr_remote (unsigned char *buf, unsigned char *addr, char addrlen)
   else
     GNUNET_assert(0);
 
-  memcpy (buf + c, addr, GNUNET_MIN (addrlen, c));
+  memcpy (buf + c, addr, GNUNET_MIN (addrlen, 4-c));
 }
 /*}}}*/