From 0c5434f36d4928ff595eb8acb8323514fc2dffe3 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Mon, 11 May 2015 13:43:37 +0000 Subject: [PATCH] [WS2_32] Apply Wine commit 51e7732 by Piotr Caban: Fix ai_canonname buffer allocation in addrinfo_AtoW. svn path=/trunk/; revision=67663 --- reactos/dll/win32/ws2_32/wine/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/ws2_32/wine/socket.c b/reactos/dll/win32/ws2_32/wine/socket.c index 5f28c922a4c..eb097a8054b 100644 --- a/reactos/dll/win32/ws2_32/wine/socket.c +++ b/reactos/dll/win32/ws2_32/wine/socket.c @@ -56,7 +56,7 @@ static struct addrinfoW *addrinfo_AtoW(const struct addrinfo *ai) if (ai->ai_canonname) { int len = MultiByteToWideChar(CP_ACP, 0, ai->ai_canonname, -1, NULL, 0); - if (!(ret->ai_canonname = HeapAlloc(GetProcessHeap(), 0, len))) + if (!(ret->ai_canonname = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)))) { HeapFree(GetProcessHeap(), 0, ret); return NULL;