Check for failed allocation in GetNamedPipeHandleStateA.
Modified: trunk/reactos/lib/kernel32/file/npipe.c
_____
Modified: trunk/reactos/lib/kernel32/file/npipe.c
--- trunk/reactos/lib/kernel32/file/npipe.c 2005-12-11 22:13:46 UTC
(rev 20088)
+++ trunk/reactos/lib/kernel32/file/npipe.c 2005-12-11 22:36:20 UTC
(rev 20089)
@@ -924,6 +924,11 @@
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return FALSE;
}
+ if (UserNameW.Buffer == NULL)
+ {
+ SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ return FALSE;
+ }
UserNameA.Buffer = lpUserName;
UserNameA.Length = 0;