[WS2_32] Apply Wine commit 51e7732 by Piotr Caban: Fix ai_canonname buffer allocation in addrinfo_AtoW.

svn path=/trunk/; revision=67663
This commit is contained in:
Amine Khaldi 2015-05-11 13:43:37 +00:00
parent eacecfd85e
commit 0c5434f36d

View 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;