mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-21 18:50:50 +01:00
loader: dosfs fails to access directory data with large cluster number
fsize is using 2 bytes for cluster number, but with fat32 we actually do have 4 bytes and with large disks the high bytes will be in use. illumos issue: https://www.illumos.org/issues/16821 Sponsored by: MNX Cloud, Inc. MFC after: 1 week
This commit is contained in:
parent
65074f6f31
commit
79a0d14fa0
@ -815,7 +815,7 @@ fsize(DOS_FS *fs, DOS_DE *de)
|
||||
int n;
|
||||
|
||||
if (!(size = cv4(de->size)) && de->attr & FA_DIR) {
|
||||
if (!(c = cv2(de->clus))) {
|
||||
if (!(c = stclus(fs->fatsz, de))) {
|
||||
size = fs->dirents * sizeof(DOS_DE);
|
||||
} else {
|
||||
if ((n = fatcnt(fs, c)) == -1)
|
||||
|
Loading…
Reference in New Issue
Block a user