Bug 438792 - dosfsck truncates large files (close to 4Gb boundery) to 0 bytes
Summary: dosfsck truncates large files (close to 4Gb boundery) to 0 bytes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dosfstools
Version: 9
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Stepan Kasal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-25 10:37 UTC by Peter Koek
Modified: 2009-03-06 00:40 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-03-06 00:40:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Peter Koek 2008-03-25 10:37:44 UTC
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.

How reproducible:
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
frequently).
use command: dosfsck -a -v /dev/...
The previous created file is now truncated to 0 bytes !!!

Expected results:
This file size is allowed on a FAT32 file system, therefore it should NOT be
truncated to 0 bytes.

Additional info:
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:
https://bugs.launchpad.net/ubuntu/+source/dosfstools/+bug/62831

Patch for dosfstools large files fix:
https://launchpad.net/ubuntu/feisty/+source/dosfstools/2.11-2.1ubuntu3/+files/dosfstools_2.11-2.1ubuntu3.diff.gz
sources of dosfstools of Ubuntu:
https://launchpad.net/ubuntu/feisty/+source/dosfstools/2.11-2.1ubuntu3/+files/dosfstools_2.11.orig.tar.gz

Comment 1 Bug Zapper 2008-05-14 06:49:34 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Daniel Baumann 2008-11-23 18:18:54 UTC
This bug has been fixed upstream in 3.0.0 (when merging debian changes in it) and can be closed now.


Note You need to log in before you can comment on or make changes to this bug.