diff options
Diffstat (limited to 'fs/fat/inode.c')
-rw-r--r-- | fs/fat/inode.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 100e3b29f597..79375a009306 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -1423,6 +1423,12 @@ static int fat_read_bpb(struct super_block *sb, struct fat_boot_sector *b, goto out; } + if (bpb->fat_fat_length == 0 && bpb->fat32_length == 0) { + if (!silent) + fat_msg(sb, KERN_ERR, "bogus number of FAT sectors"); + goto out; + } + error = 0; out: |