mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 13:53:36 +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:
parent
eacecfd85e
commit
0c5434f36d
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ static struct addrinfoW *addrinfo_AtoW(const struct addrinfo *ai)
|
||||||
if (ai->ai_canonname)
|
if (ai->ai_canonname)
|
||||||
{
|
{
|
||||||
int len = MultiByteToWideChar(CP_ACP, 0, ai->ai_canonname, -1, NULL, 0);
|
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);
|
HeapFree(GetProcessHeap(), 0, ret);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue