mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-01 15:50:27 +02:00
Limit dimensions of all image loaders to 23000x23000
This commit is contained in:
@ -154,6 +154,9 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
|
||||
Height=h;
|
||||
}
|
||||
|
||||
if (!checkImageDimensions(Width, Height))
|
||||
png_cpexcept_error(png_ptr, "Unreasonable size");
|
||||
|
||||
// Convert palette color to true color
|
||||
if (ColorType==PNG_COLOR_TYPE_PALETTE)
|
||||
png_set_palette_to_rgb(png_ptr);
|
||||
|
Reference in New Issue
Block a user