Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49656 Signed-off-by: Hans Leidekker hans@codeweavers.com --- dlls/ws2_32/socket.c | 2 +- dlls/ws2_32/tests/sock.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index eb21e4b4b35..4d2afa946b7 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -6787,7 +6787,7 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr result = getaddrinfo(node, servname, punixhints, &unixaires);
if (result && (!hints || !(hints->ai_flags & WS_AI_NUMERICHOST)) - && (!strcmp(fqdn, node) || (!strncmp(fqdn, node, hostname_len) && !node[hostname_len]))) + && node && (!strcmp(fqdn, node) || (!strncmp(fqdn, node, hostname_len) && !node[hostname_len]))) { /* If it didn't work it means the host name IP is not in /etc/hosts, try again * by sending a NULL host and avoid sending a NULL servname too because that diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index b7a3fc44539..b523c326d60 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -7778,6 +7778,10 @@ static void test_getaddrinfo(void) ok(0, "test %d: getaddrinfo failed with %d (err %d)\n", i, ret, err); } } + + memset(&hint, 0, sizeof(hint)); + ret = pgetaddrinfo(NULL, "nonexistentservice", &hint, &result); + ok(ret == WSATYPE_NOT_FOUND, "got %d\n", ret); }
static void test_ConnectEx(void)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=76859
Your paranoid android.
=== w864 (64 bit report) ===
ws2_32: sock.c:8454: Test failed: bytesReturned isn't supposed to be 1 sock.c:8478: Test failed: GetOverlappedResult failed, error 0
=== debiant (32 bit report) ===
ws2_32: sock.c:3053: Test failed: Test[1]: expected 2, got 0 sock.c:3053: Test failed: Test[2]: expected 2, got 0 sock.c:3053: Test failed: Test[1]: expected 2, got 0 sock.c:3053: Test failed: Test[2]: expected 2, got 0