From dabde6a04f6d02233bc5074a8eba613b2c4adc68 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Tue, 25 Dec 2012 10:42:29 +0100 Subject: [PATCH] d3dx9_36: Check proper signature for DIB files. --- dlls/d3dx9_36/surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index fa63e01c8b4..999c12e48a3 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -732,7 +732,7 @@ HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(LPCVOID data, UINT datasize, D3D if (FAILED(hr)) { if ((datasize >= 2) && (!strncmp(data, "P3", 2) || !strncmp(data, "P6", 2))) FIXME("File type PPM is not supported yet\n"); - else if ((datasize >= 2) && !strncmp(data, "BM", 2)) + else if ((datasize >= 4) && (*(DWORD*)data == sizeof(BITMAPINFOHEADER))) FIXME("File type DIB is not supported yet\n"); else if ((datasize >= 10) && !strncmp(data, "#?RADIANCE", 10)) FIXME("File type HDR is not supported yet\n");