Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 11e35970 authored by Agata Cacko's avatar Agata Cacko Committed by Dmitry Kazakov

Fix unnecessary integer overflow in KisTileDataStore

Casting to the wider type before multiplying will prevent
unnecessary overflow.
CID 248591
parent 89cf5a06
......@@ -108,7 +108,7 @@ KisTileDataStore::MemoryStatistics KisTileDataStore::memoryStatistics()
MemoryStatistics stats;
const qint64 metricCoeff = KisTileData::WIDTH * KisTileData::HEIGHT;
const qint64 metricCoeff = qint64(KisTileData::WIDTH) * KisTileData::HEIGHT;
stats.realMemorySize = m_pooler.lastRealMemoryMetric() * metricCoeff;
stats.historicalMemorySize = m_pooler.lastHistoricalMemoryMetric() * metricCoeff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment