Fix crash when loading 0x0 shps. Fixes #4192.
This commit is contained in:
@@ -108,6 +108,10 @@ namespace OpenRA.FileFormats
|
||||
|
||||
void Decompress(Stream stream, ImageHeader h)
|
||||
{
|
||||
// No extra work is required for empty frames
|
||||
if (h.Size.Width == 0 || h.Size.Height == 0)
|
||||
return;
|
||||
|
||||
if (recurseDepth > imageCount)
|
||||
throw new InvalidDataException("Format20/40 headers contain infinite loop");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user