Fixed buffer overflow issue in DXTCImage, added nicer error messages.

This commit is contained in:
2024-07-07 21:09:33 +03:00
parent c698136614
commit d19dc772db
8 changed files with 18 additions and 912 deletions

View File

@ -209,7 +209,8 @@ bool CGraphicImageTexture::CreateFromMemoryFile(UINT bufSize, const void * c_pvB
static CDXTCImage image;
if (image.LoadHeaderFromMemory((const BYTE *) c_pvBuf)) // DDS<44>ΰ<EFBFBD> Ȯ<><C8AE>
// Check whether the file is a DDS
if (image.LoadHeaderFromMemory((const BYTE *) c_pvBuf, bufSize))
{
return (CreateDDSTexture(image, (const BYTE *) c_pvBuf));
}