Module: wine Branch: master Commit: 3a944738025b4f608e746b28f9ea747f5755e447 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3a944738025b4f608e746b28f9...
Author: Józef Kucia joseph.kucia@gmail.com Date: Tue May 22 22:35:57 2012 +0200
d3dx9: Add a WARN to get_image_info_from_dds about too short DDS files.
---
dlls/d3dx9_36/surface.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index 6b0786c..821d51e 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -372,7 +372,10 @@ static HRESULT get_image_info_from_dds(const void *buffer, UINT length, D3DXIMAG expected_length *= faces; expected_length += sizeof(*header); if (length < expected_length) + { + WARN("File is too short %u, expected at least %u bytes\n", length, expected_length); return D3DXERR_INVALIDDATA; + }
info->ImageFileFormat = D3DXIFF_DDS;