Check for failed allocation in GetNamedPipeHandleStateA.

svn path=/trunk/; revision=20089
This commit is contained in:
Filip Navara 2005-12-11 22:36:20 +00:00
parent 408fa486e3
commit d97f75d5ed

View file

@ -924,6 +924,11 @@ GetNamedPipeHandleStateA(HANDLE hNamedPipe,
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
}
if (UserNameW.Buffer == NULL)
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
}
UserNameA.Buffer = lpUserName;
UserNameA.Length = 0;