mirror of
https://github.com/opnsense/src.git
synced 2026-02-18 18:20:26 -05: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. (cherry-picked from commit 79a0d14fa05c75038caa52099289effb85732f88)
This commit is contained in:
parent
8952296684
commit
f37dc94abc
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue