This patch add the validity check of 2 values (fats, reserved). These
values must not be 0.
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
}
b = (struct fat_boot_sector *) bh->b_data;
+ if (!b->reserved) {
+ if (!silent)
+ printk("FAT: bogus number of reserved sectors\n");
+ brelse(bh);
+ goto out_invalid;
+ }
+ if (!b->fats) {
+ if (!silent)
+ printk("FAT: bogus number of FAT structure\n");
+ brelse(bh);
+ goto out_invalid;
+ }
if (!b->secs_track) {
if (!silent)
printk("FAT: bogus sectors-per-track value\n");