[PATCH] ws2_32: Use correct buffer for 17 byte write
Marcus Meissner
meissner at suse.de
Sat Nov 7 07:02:00 CST 2009
Hi,
stackprotector is unhappy that we write a 0 byte over the end
of the dst array. It should actually be dst6 here as inet_ntop
will write 16 characters + \0.
Ciao, Marcus
---
dlls/ws2_32/tests/sock.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 518ab4a..de3dfb9 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -2443,8 +2443,9 @@ static void test_addr_to_print(void)
/* Test longer length is ok */
WSASetLastError(0);
pdst = NULL;
- pdst = pInetNtop(AF_INET6, (void*)&in6.s6_addr, dst, 18);
+ pdst = pInetNtop(AF_INET6, (void*)&in6.s6_addr, dst6, 18);
ok(pdst != NULL, "The pointer should be returned (%p)\n", pdst);
+ trace("returned %s\n",pdst);
}
static void test_ioctlsocket(void)
--
1.6.4.2
More information about the wine-patches
mailing list