mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 16:45:50 +00:00
Check for failed allocations. Spotted by Martin Bealby.
svn path=/trunk/; revision=20114
This commit is contained in:
parent
bf0b38b9fd
commit
2e9c3ff97c
1 changed files with 4 additions and 0 deletions
|
@ -260,6 +260,10 @@ CreateIconFromResourceEx(
|
|||
|
||||
/* 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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue