Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit f6cd3305 authored by Agata Cacko's avatar Agata Cacko Committed by Dmitry Kazakov

Fix unnecessary integer overflow in KisWatershedWorker

Casting to the wider type before multiplying will prevent
unnecessary overflow.
CID 248637
parent 11e35970
......@@ -644,7 +644,7 @@ void KisWatershedWorker::Private::processQueue(qint32 _backgroundGroupId)
backgroundGroupColor = groups[backgroundGroupId].colorIndex;
recolorMode = backgroundGroupId > 1;
totalPixelsToFill = boundingRect.width() * boundingRect.height();
totalPixelsToFill = qint64(boundingRect.width()) * boundingRect.height();
numFilledPixels = 0;
const int progressReportingMask = (1 << 18) - 1; // report every 512x512 patch
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