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
Unknown Object (File)
Thu, Jun 20, 7:18 PM
Unknown Object (File)
Mon, Jun 17, 10:32 PM
Unknown Object (File)
Sun, May 26, 2:01 PM
Unknown Object (File)
May 3 2024, 4:32 PM
Unknown Object (File)
Apr 23 2024, 12:33 AM
Unknown Object (File)
Dec 20 2023, 3:41 AM
Unknown Object (File)
Dec 10 2023, 6:41 PM
Unknown Object (File)
Dec 6 2023, 5:48 PM
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.