From 0a6fbd88e90c0cc20d6911104734878161b113c3 Mon Sep 17 00:00:00 2001 From: Mirco Miranda Date: Thu, 7 Sep 2023 16:12:41 +0000 Subject: [PATCH] xcf: fix crash (oss-fuzz issue 62075) --- src/imageformats/xcf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imageformats/xcf.cpp b/src/imageformats/xcf.cpp index 579a2a8..189cefb 100644 --- a/src/imageformats/xcf.cpp +++ b/src/imageformats/xcf.cpp @@ -2048,7 +2048,7 @@ bool XCFImageFormat::loadLevel(QDataStream &xcf_io, Layer &layer, qint32 bpp, co switch (layer.compression) { case COMPRESS_NONE: { - if (xcf_io.version() > 11) { + if (xcf_io.version() > 11 || size_t(bpp) > sizeof(QRgba64)) { qCDebug(XCFPLUGIN) << "Component reading not supported yet"; return false; }