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 89cf5a06 authored by Agata Cacko's avatar Agata Cacko Committed by Dmitry Kazakov

Fix unnecessary integer overflow in KisPaintDevice

Casting to the wider type before multiplying will prevent
unnecessary overflow.
CID 248409
parent 3db0d0d6
......@@ -426,7 +426,7 @@ public:
private:
qint64 estimateDataSize(Data *data) const {
const QRect &rc = data->dataManager()->extent();
return rc.width() * rc.height() * data->colorSpace()->pixelSize();
return qint64(rc.width()) * rc.height() * data->colorSpace()->pixelSize();
}
public:
......
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