Commit 3a944738 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3dx9: Add a WARN to get_image_info_from_dds about too short DDS files.

parent d313e4f9
......@@ -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;
......
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