Red Hat Bugzilla – Bug 438792
dosfsck truncates large files (close to 4Gb boundery) to 0 bytes
Last modified: 2009-03-05 19:40:52 EST
Description of problem:
dosfsck truncated large files (close to 4Gb boundary) to 0 bytes.
Version-Release number of selected component (if applicable):
I have 2.11-8, but all versions have this problem.
Create a file with size 4294966784 bytes (4 GB - 512 bytes) on a FAT32 file
system. (Files of this size are created by Acronis Image tool, which I used
use command: dosfsck -a -v /dev/...
The previous created file is now truncated to 0 bytes !!!
This file size is allowed on a FAT32 file system, therefore it should NOT be
truncated to 0 bytes.
The problem is caused by a overflow in the calculation of the filesize. In case
of a large file the multiplication 65535 * 65535 results in 0, which is
incorrect. The Ubunto distro has fixed this issue by using "long long" values,
therefore a fixed can be found at there website. But I would like to see that
this bug will be resolved in Fedora also.
see bug report ubuntu:
Patch for dosfstools large files fix:
sources of dosfstools of Ubuntu:
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
This bug has been fixed upstream in 3.0.0 (when merging debian changes in it) and can be closed now.