summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/boot.c b/boot.c
index 6e797fd..52bf011 100644
--- a/boot.c
+++ b/boot.c
@@ -205,6 +205,10 @@ readboot(dosfs, boot)
pfatal("Invalid sector size: %u", boot->BytesPerSec);
return FSFATAL;
}
+ if (boot->FATs == 0) {
+ pfatal("Invalid number of FATs: %u", boot->FATs);
+ return FSFATAL;
+ }
if (boot->Sectors) {
boot->HugeSectors = 0;
boot->NumSectors = boot->Sectors;