mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-16 10:41:34 +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 {
|
namespace Mirall {
|
||||||
|
|
||||||
static uint chunkSize() {
|
static qint64 chunkSize() {
|
||||||
static uint chunkSize;
|
static uint chunkSize;
|
||||||
if (!chunkSize) {
|
if (!chunkSize) {
|
||||||
chunkSize = qgetenv("OWNCLOUD_CHUNK_SIZE").toUInt();
|
chunkSize = qgetenv("OWNCLOUD_CHUNK_SIZE").toUInt();
|
||||||
|
@ -298,7 +298,7 @@ void PropagateUploadFileQNAM::startNextChunk()
|
||||||
currentChunkSize = chunkSize();
|
currentChunkSize = chunkSize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
device = new ChunkDevice(_file, chunkSize() * sendingChunk, currentChunkSize);
|
device = new ChunkDevice(_file, chunkSize() * quint64(sendingChunk), currentChunkSize);
|
||||||
} else {
|
} else {
|
||||||
device = _file;
|
device = _file;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue