Commit 68428f43 authored by Filippo Della Betta's avatar Filippo Della Betta Committed by Youness Alaoui

Fixed size of memcpy

parent 5d526e63
......@@ -91,11 +91,11 @@ inet_pton_win32(int af, const char *src, void *dst)
while (res) {
if( res->ai_addr->sa_family == AF_INET) {
memcpy(dst, &((struct sockaddr_in *) res->ai_addr)->sin_addr,
res->ai_addrlen);
sizeof(struct in_addr));
res = res->ai_next;
} else if(res->ai_addr->sa_family == AF_INET6) {
memcpy(dst, &((struct sockaddr_in6 *) res->ai_addr)->sin6_addr,
res->ai_addrlen);
sizeof(struct in_addr6));
res = res->ai_next;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment