[XCF/GIMP loader] Raise maximimum allowed image size to 32767x32767 on 64 bit platforms

The GIMP image loader had a limit to 16K x 16K pixels, because this would
already exhaust the 2 GByte address space limit of 32 bit systems.

Remove this limit on 64 bit systems to allow the full 32K x 32K size.

BUG: 391970

Differential Revision: https://phabricator.kde.org/D12557
This commit is contained in:
Christoph Feck 2018-05-02 02:10:26 +02:00
parent 4668fbbcdc
commit 19f33239e7

View File

@ -713,7 +713,8 @@ 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 > 32767 || layer.height > 32767 || layer.width * layer.height > 16384 * 16384) {
if (layer.width > 32767 || layer.height > 32767
|| (sizeof(void *) == 4 && layer.width * layer.height > 16384 * 16384)) {
return false;
}