From 71a43f63e31c873f708b1cb9db40180a07ecfada Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Mon, 18 Mar 2013 16:54:48 +0100 Subject: idevicebackup2: Fix integer overflow bug on 32-bit architectures --- tools/idevicebackup2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/idevicebackup2.c') diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index d70a7ae..a0ffc9b 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c @@ -1934,7 +1934,7 @@ checkpoint: memset(&fs, '\0', sizeof(fs)); res = statvfs(backup_directory, &fs); if (res == 0) { - freespace = fs.f_bavail * fs.f_bsize; + freespace = (uint64_t)fs.f_bavail * (uint64_t)fs.f_bsize; } #endif mobilebackup2_send_status_response(mobilebackup2, res, NULL, plist_new_uint(freespace)); -- cgit v1.1-32-gdbae