[ros-diffs] [navaraf] 20089: Check for failed allocation in GetNamedPipeHandleStateA.

navaraf at svn.reactos.com navaraf at svn.reactos.com
Sun Dec 11 23:36:28 CET 2005


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;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051211/4e1f9c67/attachment.html


More information about the Ros-diffs mailing list