Christian Costa : d3dx9_36: Check proper signature for DIB files.

Alexandre Julliard julliard at winehq.org
Thu Dec 27 13:02:30 CST 2012


Module: wine
Branch: master
Commit: dabde6a04f6d02233bc5074a8eba613b2c4adc68
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=dabde6a04f6d02233bc5074a8eba613b2c4adc68

Author: Christian Costa <titan.costa at gmail.com>
Date:   Tue Dec 25 10:42:29 2012 +0100

d3dx9_36: Check proper signature for DIB files.

---

 dlls/d3dx9_36/surface.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index fa63e01..999c12e 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");




More information about the wine-cvs mailing list