diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2012-05-29 08:49:37 -0700 |
---|---|---|
committer | android code review <noreply-gerritcodereview@google.com> | 2012-05-29 08:49:37 -0700 |
commit | ed86a9f77e796aa5923a5b2d1455a7739b86e60b (patch) | |
tree | 816978ab1a5455edfc896935c5569c4682977f6e | |
parent | f717a6ed5b25287fa9417096f90e7c047ace0c15 (diff) | |
parent | 6c29bbe8d58e6fe8755935a04166ecf82ff31f47 (diff) | |
download | fsck_msdos-ed86a9f77e796aa5923a5b2d1455a7739b86e60b.tar.gz |
Merge "Detect and handle invalid number of FATs"android-sdk-support_r11android-sdk-adt_r20android-cts-4.2_r2android-cts-4.2_r1android-4.3_r3.1android-4.3_r3android-4.3_r2.3android-4.3_r2.2android-4.3_r2.1android-4.3_r2android-4.3_r1.1android-4.3_r1android-4.3_r0.9.1android-4.3_r0.9android-4.3.1_r1android-4.2_r1android-4.2.2_r1.2android-4.2.2_r1.1android-4.2.2_r1android-4.2.1_r1.2android-4.2.1_r1.1android-4.2.1_r1tools_r22tools_r21tools_r20jb-mr2.0.0-releasejb-mr2.0-releasejb-mr2-releasejb-mr2-devjb-mr1.1-releasejb-mr1.1-devjb-mr1-releasejb-mr1-dev-plus-aospjb-mr1-devics-plus-aosp
-rw-r--r-- | boot.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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; |