From 4957c18a445b2655c91ad1d36325b88c3d714172 Mon Sep 17 00:00:00 2001 From: Michael Pyne Date: Sun, 27 Dec 2015 21:52:47 -0500 Subject: [PATCH] Widen int to qint64 before multiplication, not after. Noted by Coverity, CID 1334968. --- composite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composite.cpp b/composite.cpp index f28aba7f9c..aa0e4b7286 100644 --- a/composite.cpp +++ b/composite.cpp @@ -79,7 +79,7 @@ void CompositorSelectionOwner::looseOwnership() KWIN_SINGLETON_FACTORY_VARIABLE(Compositor, s_compositor) -static inline qint64 milliToNano(int milli) { return milli * 1000 * 1000; } +static inline qint64 milliToNano(int milli) { return qint64(milli) * 1000 * 1000; } static inline qint64 nanoToMilli(int nano) { return nano / (1000*1000); } Compositor::Compositor(QObject* workspace)