Require FAT to occupy at least one sector.
Obtained from: Android https://r.android.com/1205830 MFC after: 3 days
This commit is contained in:
parent
24da5d4511
commit
d705f2ff45
@ -250,7 +250,7 @@ readboot(int dosfs, struct bootblock *boot)
|
||||
boot->FATsecs = boot->bpbFATsmall;
|
||||
}
|
||||
|
||||
if (boot->FATsecs > UINT32_MAX / boot->bpbFATs) {
|
||||
if (boot->FATsecs < 1 || boot->FATsecs > UINT32_MAX / boot->bpbFATs) {
|
||||
pfatal("Invalid FATs(%u) with FATsecs(%zu)",
|
||||
boot->bpbFATs, (size_t)boot->FATsecs);
|
||||
return FSFATAL;
|
||||
|
Loading…
Reference in New Issue
Block a user