mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +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 HeaderSize;
|
||||||
ULONG ColorCount;
|
ULONG ColorCount;
|
||||||
PVOID Data;
|
PVOID Data;
|
||||||
|
BOOL Hit = FALSE;
|
||||||
|
|
||||||
if (!(fuLoad & LR_LOADFROMFILE))
|
if (!(fuLoad & LR_LOADFROMFILE))
|
||||||
{
|
{
|
||||||
|
@ -470,7 +471,25 @@ LoadBitmapImage(HINSTANCE hInstance, LPCWSTR lpszName, UINT fuLoad)
|
||||||
UnmapViewOfFile(BitmapInfo);
|
UnmapViewOfFile(BitmapInfo);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_SEH2_TRY
|
||||||
|
{
|
||||||
memcpy(PrivateInfo, BitmapInfo, HeaderSize);
|
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. */
|
/* FIXME: Handle color conversion and transparency. */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue