From 5eb09116b0abe750c9d549ebd82259329b46fe0c Mon Sep 17 00:00:00 2001 From: Mirco Miranda Date: Mon, 23 Feb 2026 14:37:24 +0100 Subject: [PATCH] IFF: fix buffer read overflow --- src/imageformats/chunks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imageformats/chunks.cpp b/src/imageformats/chunks.cpp index 8079ae5..35b12fe 100644 --- a/src/imageformats/chunks.cpp +++ b/src/imageformats/chunks.cpp @@ -3012,7 +3012,7 @@ QByteArray IDATChunk::strideRead(QIODevice *d, qint32 y, const IHDRChunk *header } if (header->model() == IHDRChunk::CLut4) { - if (rr.size() < header->width() / 2) { + if (rr.size() < (qint64(header->width()) + 1) / 2) { return {}; } QByteArray tmp(header->width(), char());