Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fsck.fat: Do not truncate files in cluster chain of size 2^32
File with size 4294967295 (2^32-1) is stored in cluster chain of size 4294967296 (2^32). This cluster chain length cannot be represented in 32-bit integer so explicitly cast calculation to 64-bit (long long) integer. Before this change all files with size of 4294967295 bytes were auto truncated to zero size because cluster chain size overflowed to zero. This change fixes it and valid files are not automatically truncated. Fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001845
- Loading branch information
Showing
1 changed file
with
41 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters