mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user