[Pkg-owncloud-commits] [owncloud-client] 06/219: uploading: make sure to cast to uint64 to avoid integer overflow

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 11 14:43:03 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 302499b4838f64240d53d5832fcff62c09d7be5a
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Tue Aug 26 12:30:00 2014 +0200

    uploading: make sure to cast to uint64 to avoid integer overflow
---
 src/mirall/propagator_qnam.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mirall/propagator_qnam.cpp b/src/mirall/propagator_qnam.cpp
index ef99818..9f83725 100644
--- a/src/mirall/propagator_qnam.cpp
+++ b/src/mirall/propagator_qnam.cpp
@@ -27,7 +27,7 @@
 
 namespace Mirall {
 
-static uint chunkSize() {
+static qint64 chunkSize() {
     static uint chunkSize;
     if (!chunkSize) {
         chunkSize = qgetenv("OWNCLOUD_CHUNK_SIZE").toUInt();
@@ -231,7 +231,7 @@ void PropagateUploadFileQNAM::startNextChunk()
                 currentChunkSize = chunkSize();
             }
         }
-        device = new ChunkDevice(_file, chunkSize() * sendingChunk, currentChunkSize);
+        device = new ChunkDevice(_file, chunkSize() * quint64(sendingChunk), currentChunkSize);
     } else {
         device = _file;
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list