Limit dimensions of all image loaders to 23000x23000

This commit is contained in:
sfan5
2021-09-30 16:40:41 +02:00
parent 594de99153
commit dbd39120e7
5 changed files with 24 additions and 2 deletions

View File

@ -13,6 +13,13 @@ namespace irr
namespace video
{
//! check sanity of image dimensions to prevent issues later, for use by CImageLoaders
inline bool checkImageDimensions(u32 width, u32 height)
{
// 4 * 23000 * 23000 is just under S32_MAX
return width <= 23000 && height <= 23000;
}
//! IImage implementation with a lot of special image operations for
//! 16 bit A1R5G5B5/32 Bit A8R8G8B8 images, which are used by the SoftwareDevice.
class CImage : public IImage