mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 05:37:44 +00:00
[User32]
Check return value of DIB_GetBitmapInfo. svn path=/trunk/; revision=53836
This commit is contained in:
parent
0c34695bab
commit
8a0fec1a86
|
@ -1709,7 +1709,7 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name,
|
|||
core->bcWidth = new_width;
|
||||
core->bcHeight = new_height;
|
||||
}
|
||||
else
|
||||
else if (bm_type == 1)
|
||||
{
|
||||
/* Some sanity checks for BITMAPINFO (not applicable to BITMAPCOREINFO) */
|
||||
if (info->bmiHeader.biHeight > 65535 || info->bmiHeader.biWidth > 65535) {
|
||||
|
@ -1720,6 +1720,8 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name,
|
|||
scaled_info->bmiHeader.biWidth = new_width;
|
||||
scaled_info->bmiHeader.biHeight = new_height;
|
||||
}
|
||||
else
|
||||
goto end;
|
||||
|
||||
if (new_height < 0) new_height = -new_height;
|
||||
|
||||
|
|
Loading…
Reference in a new issue