mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -04:00
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:
parent
3b0c767f82
commit
2755f74fbb
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user