Page MenuHomeFreeBSD

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

Authored by siva on Jun 15 2017, 3:31 PM.
Tags
None
Referenced Files
F154340502: D11217.id.diff
Mon, Apr 27, 11:19 PM
F154275177: D11217.id.diff
Mon, Apr 27, 1:15 PM
F154273535: D11217.id.diff
Mon, Apr 27, 1:03 PM
Unknown Object (File)
Sun, Apr 26, 7:31 AM
Unknown Object (File)
Sun, Apr 26, 4:00 AM
Unknown Object (File)
Wed, Apr 22, 8:33 AM
Unknown Object (File)
Tue, Apr 21, 6:49 PM
Unknown Object (File)
Sat, Apr 11, 4:54 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.