mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-15 18:21:35 +03:00
uploading: make sure to cast to uint64 to avoid integer overflow
This commit is contained in:
parent
7ec0c52439
commit
c232411e96
1 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,7 @@
|
|||
|
||||
namespace Mirall {
|
||||
|
||||
static uint chunkSize() {
|
||||
static qint64 chunkSize() {
|
||||
static uint chunkSize;
|
||||
if (!chunkSize) {
|
||||
chunkSize = qgetenv("OWNCLOUD_CHUNK_SIZE").toUInt();
|
||||
|
@ -298,7 +298,7 @@ void PropagateUploadFileQNAM::startNextChunk()
|
|||
currentChunkSize = chunkSize();
|
||||
}
|
||||
}
|
||||
device = new ChunkDevice(_file, chunkSize() * sendingChunk, currentChunkSize);
|
||||
device = new ChunkDevice(_file, chunkSize() * quint64(sendingChunk), currentChunkSize);
|
||||
} else {
|
||||
device = _file;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue