From f7408f5a77c6dc9aeb0b8e4c5be476899a0f6b51 Mon Sep 17 00:00:00 2001 From: Mirco Miranda Date: Mon, 2 Nov 2026 09:26:56 +0100 Subject: [PATCH] DDS: Limit the maximum number of images to 32 --- src/imageformats/dds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imageformats/dds.cpp b/src/imageformats/dds.cpp index 509689e..b1f6fc0 100644 --- a/src/imageformats/dds.cpp +++ b/src/imageformats/dds.cpp @@ -2602,7 +2602,7 @@ int QDDSHandler::imageCount() const if (!ensureScanned()) return 0; - return qMax(1, m_header.mipMapCount); + return qBound(1, m_header.mipMapCount, 32); } bool QDDSHandler::jumpToImage(int imageNumber)