Commit 16f4dc07 authored by Christoph Feck's avatar Christoph Feck
Browse files

Even more tolerance in layer size sanity check

Appearantly, there are files out there with layers much
larger than the actual image. The layer size is now checked
against larger limits (32K in each dimension, 256M total).

BUG: 308143
FIXED-IN: 4.10
parent 9e93efab
......@@ -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.width > 2 * xcf_image.width || layer.height > 2 * xcf_image.height)
if (layer.width > 32767 || layer.height > 32767 || layer.width * layer.height > 16384 * 16384)
return false;
layer.image_tiles.resize(layer.nrows);
......
Markdown is supported
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