DDS parsing error handling

This commit is contained in:
Chuck Walbourn 2016-09-07 14:59:04 -07:00
parent fd11ad4533
commit 53e66ba1e9

View File

@ -1069,7 +1069,10 @@ static HRESULT _CopyImage( _In_reads_bytes_(size) const void* pPixels, _In_ size
return E_FAIL;
}
assert( pixelSize <= size );
if (pixelSize > size)
{
return E_FAIL;
}
std::unique_ptr<Image[]> timages( new (std::nothrow) Image[nimages] );
if ( !timages )