XCF: Increased maximum property size

CCBUG: 426222

The problem was caused by a check on the maximum size of properties (specifically it failed on PROP_PARASITES).
This commit is contained in:
Mirco Miranda 2024-06-07 11:43:31 +00:00 committed by Albert Astals Cid
parent b8a9c75c80
commit 4f61e3912c

View File

@ -1091,7 +1091,9 @@ bool XCFImageFormat::loadProperty(QDataStream &xcf_io, PropType &type, QByteArra
size = 0;
} else {
xcf_io >> size;
if (size > 256000) {
if (size > 256000 * 4) {
// NOTE: I didn't find any reference to maximum property dimensions in the specs, so I assume it's just a sanity check.
qCDebug(XCFPLUGIN) << "XCF: loadProperty skips" << type << "due to size being too large";
return false;
}
data = new char[size];