commit | ed86a9f77e796aa5923a5b2d1455a7739b86e60b | [log] [tgz] |
---|---|---|
author | Jean-Baptiste Queru <jbq@google.com> | Tue May 29 08:49:37 2012 -0700 |
committer | android code review <noreply-gerritcodereview@google.com> | Tue May 29 08:49:37 2012 -0700 |
tree | 816978ab1a5455edfc896935c5569c4682977f6e | |
parent | f717a6ed5b25287fa9417096f90e7c047ace0c15 [diff] | |
parent | 6c29bbe8d58e6fe8755935a04166ecf82ff31f47 [diff] |
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;