[ros-diffs] [navaraf] 20114: Check for failed allocations. Spotted
by Martin Bealby.
navaraf at svn.reactos.com
navaraf at svn.reactos.com
Mon Dec 12 21:30:24 CET 2005
Check for failed allocations. Spotted by Martin Bealby.
Modified: trunk/reactos/lib/user32/windows/icon.c
_____
Modified: trunk/reactos/lib/user32/windows/icon.c
--- trunk/reactos/lib/user32/windows/icon.c 2005-12-12 20:26:19 UTC
(rev 20113)
+++ trunk/reactos/lib/user32/windows/icon.c 2005-12-12 20:30:09 UTC
(rev 20114)
@@ -260,6 +260,10 @@
/* get an safe copy of the icon data */
SafeIconImage = RtlAllocateHeap(GetProcessHeap(), 0, cbIconBits);
+ if (SafeIconImage == NULL)
+ {
+ return NULL;
+ }
memcpy(SafeIconImage, pbIconBits, cbIconBits);
/* take into acount the origonal height was for both the AND and XOR
images */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051212/e5bf0aec/attachment.html
More information about the Ros-diffs
mailing list