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;