[Pkg-owncloud-commits] [owncloud-client] 03/20: csync_vio_local on windows: fix overflow when computing the size of file > 4GiB
Sandro Knauß
hefee-guest at moszumanska.debian.org
Fri Oct 24 20:08:12 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch sid
in repository owncloud-client.
commit 8711a3ea6c92942584b2813d37e7577495916e4e
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Wed Sep 10 12:09:22 2014 +0200
csync_vio_local on windows: fix overflow when computing the size of file > 4GiB
MAXDWORD is 0xFFFFFFFF, so if we add one, it overflows and is 0.
We need to cast it to 64 bits before
---
csync/src/vio/csync_vio_local.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/csync/src/vio/csync_vio_local.c b/csync/src/vio/csync_vio_local.c
index 1d51f0c..79213e8 100644
--- a/csync/src/vio/csync_vio_local.c
+++ b/csync/src/vio/csync_vio_local.c
@@ -240,7 +240,7 @@ int csync_vio_local_stat(const char *uri, csync_vio_file_stat_t *buf) {
/* printf("Index: %I64i\n", FileIndex.QuadPart); */
buf->inode = FileIndex.QuadPart;
- buf->size = (fileInfo.nFileSizeHigh * (int64_t)(MAXDWORD+1)) + fileInfo.nFileSizeLow;
+ buf->size = (fileInfo.nFileSizeHigh * ((int64_t)(MAXDWORD)+1)) + fileInfo.nFileSizeLow;
buf->fields |= CSYNC_VIO_FILE_STAT_FIELDS_SIZE;
/* Get the file time with a win32 call rather than through stat. See
--
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