Commit 94a3c098 authored by Wolfram Sang's avatar Wolfram Sang Committed by Alexandre Julliard

user32: Ignore reserved bytes in BMP fileheader.

parent b25cd21d
......@@ -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 );
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment