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'
This commit is contained in:
Albert Astals Cid 2021-03-28 14:07:46 +02:00
parent 3b0c767f82
commit 2755f74fbb

View File

@ -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;
}