osdep/linux/blocklist.c (grub_install_get_blocklist): Check blocksize validity.
This commit is contained in:
parent
4200ad44fe
commit
111ab3b9cc
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/osdep/linux/blocklist.c (grub_install_get_blocklist): Check
|
||||
blocksize validity.
|
||||
|
||||
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/disk/i386/pc/biosdisk.c: Check disk size sanity.
|
||||
|
|
|
@ -82,6 +82,8 @@ grub_install_get_blocklist (grub_device_t root_dev,
|
|||
strerror (errno));
|
||||
if (bsize & (GRUB_DISK_SECTOR_SIZE - 1))
|
||||
grub_util_error ("%s", _("blocksize is not divisible by 512"));
|
||||
if (!bsize)
|
||||
grub_util_error ("%s", _("invalid zero blocksize"));
|
||||
mul = bsize >> GRUB_DISK_SECTOR_BITS;
|
||||
nblocks = (core_size + bsize - 1) / bsize;
|
||||
if (mul == 0 || nblocks == 0)
|
||||
|
|
Loading…
Reference in a new issue