mirror of
https://github.com/minetest/irrlicht.git
synced 2025-09-16 13:26:39 +02:00
Limit dimensions of all image loaders to 23000x23000
This commit is contained in:
@@ -106,6 +106,12 @@ IImage* CImageLoaderTGA::loadImage(io::IReadFile* file) const
|
||||
header.ImageHeight = os::Byteswap::byteswap(header.ImageHeight);
|
||||
#endif
|
||||
|
||||
if (!checkImageDimensions(header.ImageWidth, header.ImageHeight))
|
||||
{
|
||||
os::Printer::log("Rejecting TGA with unreasonable size.", ELL_ERROR);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// skip image identification field
|
||||
if (header.IdLength)
|
||||
file->seek(header.IdLength, true);
|
||||
|
Reference in New Issue
Block a user