freebsd-dev/sbin/fsck_msdosfs
Xin LI d3dd66792b Correct off-by-two issue when determining FAT type.
In the code we used NumClusters as the upper (non-inclusive) boundary
of valid cluster number, so the actual value was 2 (CLUST_FIRST) more
than the real number of clusters. This causes a FAT16 media with
65524 clusters be treated as FAT32 and might affect FAT12 media with
4084 clusters as well.

To fix this, we increment NumClusters by CLUST_FIRST after the type
determination.

PR:		243179
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D23082
2020-01-11 17:41:20 +00:00
..
boot.c Correct off-by-two issue when determining FAT type. 2020-01-11 17:41:20 +00:00
check.c Reduce memory footprint of fsck_msdosfs. 2020-01-03 00:31:48 +00:00
dir.c Reduce memory footprint of fsck_msdosfs. 2020-01-03 00:31:48 +00:00
dosfs.h Reduce memory footprint of fsck_msdosfs. 2020-01-03 00:31:48 +00:00
ext.h Reduce memory footprint of fsck_msdosfs. 2020-01-03 00:31:48 +00:00
fat.c Reduce memory footprint of fsck_msdosfs. 2020-01-03 00:31:48 +00:00
fsck_msdosfs.8 fsck_msdosfs.8: document -M. 2020-01-07 04:33:14 +00:00
main.c Reduce memory footprint of fsck_msdosfs. 2020-01-03 00:31:48 +00:00
Makefile Revert Makefile@335696 that sneaked into the commit. 2018-06-27 06:50:24 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00