[ros-diffs] [navaraf] 20118: Check for failed allocations. Spotted by Martin Bealby.

navaraf at svn.reactos.com navaraf at svn.reactos.com
Mon Dec 12 21:49:46 CET 2005


Check for failed allocations. Spotted by Martin Bealby.
Modified: trunk/reactos/lib/user32/misc/winhelp.c
  _____  

Modified: trunk/reactos/lib/user32/misc/winhelp.c
--- trunk/reactos/lib/user32/misc/winhelp.c	2005-12-12 20:46:26 UTC
(rev 20117)
+++ trunk/reactos/lib/user32/misc/winhelp.c	2005-12-12 20:49:35 UTC
(rev 20118)
@@ -107,6 +107,8 @@

 		nlen = 0;
 	size = sizeof(WINHELP) + nlen + dsize;
 	hwh = GlobalAlloc(0,size);
+	if (hwh == NULL)
+		return FALSE;
 	lpwh = GlobalLock(hwh);
 	lpwh->size = size;
 	lpwh->command = uCommand;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051212/a5f98855/attachment.html


More information about the Ros-diffs mailing list