ws2_32: Correctly null-terminate the addrinfo chain.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52288
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-12-29 12:38:53 -06:00 committed by Alexandre Julliard
parent 7f95c69299
commit 9947a8d0de
1 changed files with 1 additions and 2 deletions

View File

@ -752,6 +752,7 @@ static NTSTATUS unix_getaddrinfo( void *args )
dst->ai_addrlen = sockaddr_from_unix( (const union unix_sockaddr *)src->ai_addr, NULL, 0 );
dst->ai_addr = next;
sockaddr_from_unix( (const union unix_sockaddr *)src->ai_addr, dst->ai_addr, dst->ai_addrlen );
dst->ai_next = NULL;
next = (char *)dst->ai_addr + dst->ai_addrlen;
if (dst == params->info || !addrinfo_in_list( params->info, dst ))
@ -763,8 +764,6 @@ static NTSTATUS unix_getaddrinfo( void *args )
}
}
dst->ai_next = NULL;
freeaddrinfo( unix_info );
return 0;
#else