Commit b26309eb authored by Christoph Feck's avatar Christoph Feck
Browse files

Add tolerance to layer size sanity check

Commit for bug 234030 caused a regression with images
that have layers larger than the canvas.

The factor 2 is arbitrary, but is hopefully sufficient.

BUG: 308143
FIXED-IN: 4.9.4
parent 4769d2f1
......@@ -501,7 +501,7 @@ bool XCFImageFormat::composeTiles(XCFImage& xcf_image)
// SANITY CHECK: Catch corrupted XCF image file where the width or height
// of a tile is reported are bogus. See Bug# 234030.
if (layer.height > xcf_image.height || layer.width > xcf_image.width)
if (layer.width > 2 * xcf_image.width || layer.height > 2 * xcf_image.height)
return false;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment