[WS2_32] Apply Wine commit 51e7732 by Piotr Caban: Fix ai_canonname buffer allocation...
authorAmine Khaldi <amine.khaldi@reactos.org>
Mon, 11 May 2015 13:43:37 +0000 (13:43 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Mon, 11 May 2015 13:43:37 +0000 (13:43 +0000)
svn path=/trunk/; revision=67663

reactos/dll/win32/ws2_32/wine/socket.c

index 5f28c92..eb097a8 100644 (file)
@@ -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;