From 94a3c0987e2765a4eed0a6dcba37dc45ca3d7dbf Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Mon, 26 Apr 2010 01:13:37 +0200 Subject: [PATCH] user32: Ignore reserved bytes in BMP fileheader. --- dlls/user32/cursoricon.c | 4 +--- dlls/user32/tests/cursoricon.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 7035c1bb792..0d742764ed5 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -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 ); diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index eb22ce464e9..c1da70df0ab 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -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,