Page MenuHomeFreeBSD

Properly zero out high cluster data on non-FAT32 msdos filesystems
AbandonedPublic

Authored by guest-svmhdvn on Jun 15 2017, 3:31 PM.
Tags
None
Referenced Files
F108006815: D11217.diff
Mon, Jan 20, 11:09 AM
Unknown Object (File)
Fri, Jan 17, 2:07 PM
Unknown Object (File)
Mon, Dec 23, 7:39 AM
Unknown Object (File)
Mon, Dec 23, 7:38 AM
Unknown Object (File)
Oct 27 2024, 12:45 PM
Unknown Object (File)
Oct 27 2024, 12:45 PM
Unknown Object (File)
Oct 23 2024, 10:28 AM
Unknown Object (File)
Oct 18 2024, 10:50 AM
Subscribers
None

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/fs/msdosfs/denode.h
214

I wonder why this wasn't putushort((dp)->deHighClust, FAT32((dep)->de_pmp) ? (dep)->de_StartCluster >> 16) : 0)

(Or for that matter, can de_StartCluster be > 0xffff in FAT12 / FAT16?)

sys/fs/msdosfs/denode.h
214

Not sure why the more succinct version wasn't used, it has the same clarity as the explicitly named macros.
Also, based on http://www.beginningtoseethelight.org/fat16/index.htm, the "data location" section in the data entry diagram states that the maximum value on FAT16 can only be 0xFFFF, so there may not be a point to this. I guess the only way that this matters is if a value greater than 0xFFFF was accidentally written to that field, in which case there are more important bugs to consider.

Abandoning because this change doesn't functionally change anything, it isn't actually fixing any bugs.