Merge "Detect and handle invalid number of FATs"
diff --git a/boot.c b/boot.c
index 6e797fd..52bf011 100644
--- a/boot.c
+++ b/boot.c
@@ -205,6 +205,10 @@
 		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;