user32: Ignore reserved bytes in BMP fileheader.

This commit is contained in:
Wolfram Sang 2010-04-26 01:13:37 +02:00 committed by Alexandre Julliard
parent b25cd21df2
commit 94a3c0987e
2 changed files with 2 additions and 4 deletions

View File

@ -2486,9 +2486,7 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name,
if (!(ptr = map_fileW( name, NULL ))) return 0;
info = (BITMAPINFO *)(ptr + sizeof(BITMAPFILEHEADER));
bmfh = (BITMAPFILEHEADER *)ptr;
if (!( bmfh->bfType == 0x4d42 /* 'BM' */ &&
bmfh->bfReserved1 == 0 &&
bmfh->bfReserved2 == 0))
if (bmfh->bfType != 0x4d42 /* 'BM' */)
{
WARN("Invalid/unsupported bitmap format!\n");
UnmapViewOfFile( ptr );

View File

@ -700,7 +700,7 @@ static const unsigned char pngimage[285] = {
/* 1x1 pixel bmp */
static const unsigned char bmpimage[66] = {
0x42,0x4d,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x28,0x00,
0x42,0x4d,0x42,0x00,0x00,0x00,0xDE,0xAD,0xBE,0xEF,0x3e,0x00,0x00,0x00,0x28,0x00,
0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,
0x00,0x00,0x04,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x02,0x00,
0x00,0x00,0x02,0x00,0x00,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0x00,