From ad40849149b32c455e48b938cce5ad5578a3314d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Tue, 30 Jul 2013 11:07:12 +0200 Subject: [PATCH] Forced 64-bit computation of inode number in ntfsundelete An inode number computation was done with 32 bits, and could (theoretically) lead to truncation. --- ntfsprogs/ntfsundelete.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ntfsprogs/ntfsundelete.c b/ntfsprogs/ntfsundelete.c index 4a9b3ec5..b74f4c5f 100644 --- a/ntfsprogs/ntfsundelete.c +++ b/ntfsprogs/ntfsundelete.c @@ -2180,7 +2180,8 @@ static int scan_disk(ntfs_volume *vol) ntfs_attr *attr; long long size; long long bmpsize; - int i, j, k, b; + long long i; + int j, k, b; int percent; struct ufile *file; regex_t re; @@ -2238,7 +2239,8 @@ static int scan_disk(ntfs_volume *vol) continue; file = read_record(vol, (i+j)*8+k); if (!file) { - ntfs_log_error("Couldn't read MFT Record %d.\n", (i+j)*8+k); + ntfs_log_error("Couldn't read MFT Record %lld.\n", + (long long)(i+j)*8+k); continue; }