From 9f9df4b6e05cc5950953177a1cb48739f1ddfc29 Mon Sep 17 00:00:00 2001 From: Sebastian Bauer Date: Thu, 31 Dec 2015 11:13:21 +0100 Subject: [PATCH] Copy into the correct destination. --- src/posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/posix.c b/src/posix.c index de9181a42..c7201ba14 100644 --- a/src/posix.c +++ b/src/posix.c @@ -66,7 +66,7 @@ int p_getaddrinfo( p_freeaddrinfo(ainfo); return -1; } - memcpy(&ai->ai_next, ainfo, sizeof(struct addrinfo)); + memcpy(ai->ai_next, ainfo, sizeof(struct addrinfo)); memcpy(&ai->ai_next->ai_addr_in.sin_addr, ainfo->ai_hostent->h_addr_list[p], ainfo->ai_hostent->h_length);