mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-13 13:40:14 +02:00
Fixed file length validation problem in LoadDDSFromFile
This commit is contained in:
parent
1167ebb9c7
commit
4332a15dda
@ -1573,7 +1573,7 @@ HRESULT LoadFromDDSFile( LPCWSTR szFile, DWORD flags, TexMetadata* metadata, Scr
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( remaining > image.GetPixelsSize() )
|
if ( remaining < image.GetPixelsSize() )
|
||||||
{
|
{
|
||||||
image.Release();
|
image.Release();
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user