diff options
authorkh1 <>2014-04-02 10:21:25 +0200
committerKarsten Heimrich <>2014-04-03 11:08:12 +0200
commit212de513466eac2991421a4252abdbccf3e2c74e (patch)
parent476d7ec5ba7c9704542b17a8157e9ace6fddb448 (diff)
Calm down the possibility of a buffer overflow.
Still the maximum values do not fit exactly into the double, though way better than the previous overflow while passing a large qint64 as qint32 into the function. Fixes some progress issues I've noticed with very large files that I downloaded. Change-Id: I7c9ea1fbd8cdd454c3ffd5f952dd0118fdf11c28 Reviewed-by: Kai Koehne <> Reviewed-by: Niels Weber <>
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/kdtools/kdupdaterfiledownloader.cpp b/src/libs/kdtools/kdupdaterfiledownloader.cpp
index cbd4ee184..f2063c8c4 100644
--- a/src/libs/kdtools/kdupdaterfiledownloader.cpp
+++ b/src/libs/kdtools/kdupdaterfiledownloader.cpp
@@ -62,7 +62,7 @@
using namespace KDUpdater;
using namespace QInstaller;
-static double calcProgress(qint32 done, qint32 total)
+static double calcProgress(qint64 done, qint64 total)
return total ? (double(done) / double(total)) : 0;