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;