memcpy size fix from Spike

This commit is contained in:
Eric Wasylishen 2016-10-29 12:49:45 -06:00
parent 97bccd3be6
commit 693d9fed3e

View file

@ -440,7 +440,7 @@ int UDP_GetSocketAddr (sys_socket_t socketid, struct qsockaddr *addr)
{
static const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
if (!memcmp(&((struct sockaddr_in6 *)addr)->sin6_addr, &in6addr_any, sizeof(in6addr_any)))
memcpy(&((struct sockaddr_in6 *)addr)->sin6_addr, &myAddrv6, sizeof(struct sockaddr_in6));
memcpy(&((struct sockaddr_in6 *)addr)->sin6_addr, &myAddrv6, sizeof(((struct sockaddr_in6 *)addr)->sin6_addr));
}
return 0;