* grub-core/disk/i386/pc/biosdisk.c: Check disk size sanity.
This commit is contained in:
parent
f1959b1695
commit
4200ad44fe
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/disk/i386/pc/biosdisk.c: Check disk size sanity.
|
||||||
|
|
||||||
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
|
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/disk/ieee1275/nand.c (grub_nand_open): Check block size
|
* grub-core/disk/ieee1275/nand.c (grub_nand_open): Check block size
|
||||||
|
|
|
@ -419,6 +419,11 @@ grub_biosdisk_open (const char *name, grub_disk_t disk)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data->sectors == 0)
|
||||||
|
data->sectors = 63;
|
||||||
|
if (data->heads == 0)
|
||||||
|
data->heads = 255;
|
||||||
|
|
||||||
if (! total_sectors)
|
if (! total_sectors)
|
||||||
total_sectors = data->cylinders * data->heads * data->sectors;
|
total_sectors = data->cylinders * data->heads * data->sectors;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue