mirror of
https://github.com/reactos/reactos.git
synced 2025-01-07 06:45:24 +00:00
- Example of a thread overrun? HAX-Fixes wine cursoricon test.
svn path=/trunk/; revision=38348
This commit is contained in:
parent
238bb2f73a
commit
131b8b30ad
1 changed files with 20 additions and 1 deletions
|
@ -412,6 +412,7 @@ LoadBitmapImage(HINSTANCE hInstance, LPCWSTR lpszName, UINT fuLoad)
|
|||
ULONG HeaderSize;
|
||||
ULONG ColorCount;
|
||||
PVOID Data;
|
||||
BOOL Hit = FALSE;
|
||||
|
||||
if (!(fuLoad & LR_LOADFROMFILE))
|
||||
{
|
||||
|
@ -470,8 +471,26 @@ LoadBitmapImage(HINSTANCE hInstance, LPCWSTR lpszName, UINT fuLoad)
|
|||
UnmapViewOfFile(BitmapInfo);
|
||||
return NULL;
|
||||
}
|
||||
memcpy(PrivateInfo, BitmapInfo, HeaderSize);
|
||||
|
||||
_SEH2_TRY
|
||||
{
|
||||
memcpy(PrivateInfo, BitmapInfo, HeaderSize);
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
Hit = TRUE;
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
if (Hit)
|
||||
{
|
||||
DbgPrint("We have a thread overrun, these are already freed! pi -> %d bi -> %d\n", PrivateInfo, BitmapInfo);
|
||||
RtlFreeHeap(GetProcessHeap(), 0, PrivateInfo);
|
||||
if (fuLoad & LR_LOADFROMFILE)
|
||||
UnmapViewOfFile(BitmapInfo);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* FIXME: Handle color conversion and transparency. */
|
||||
|
||||
hScreenDc = CreateCompatibleDC(NULL);
|
||||
|
|
Loading…
Reference in a new issue