Commit 111ab3b9 authored by Vladimir Serbinenko's avatar Vladimir Serbinenko
Browse files

osdep/linux/blocklist.c (grub_install_get_blocklist): Check blocksize validity.

parent 4200ad44
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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment