From 2755f74fbb0637e3e732d235e1e9d3d570f00fd1 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Sun, 28 Mar 2021 14:07:46 +0200 Subject: [PATCH] ani: convert +1 to -1 so we don't do a potential integer overflow oss-fuzz/32601 runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' --- src/imageformats/ani.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imageformats/ani.cpp b/src/imageformats/ani.cpp index ad4af26..9bf3470 100644 --- a/src/imageformats/ani.cpp +++ b/src/imageformats/ani.cpp @@ -504,7 +504,7 @@ bool ANIHandler::ensureScanned() const return false; } - if (!m_frameOffsets.isEmpty() && m_frameOffsets.count() != m_frameCount + 1) { + if (!m_frameOffsets.isEmpty() && m_frameOffsets.count() - 1 != m_frameCount) { qWarning("ANIHandler: number of actual frames does not match 'nFrames' in anih"); return false; }