diff --git a/ChangeLog b/ChangeLog index e8c1d6870..87c465843 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-01-20 Vladimir Serbinenko + + * grub-core/osdep/linux/blocklist.c (grub_install_get_blocklist): Check + blocksize validity. + 2015-01-20 Vladimir Serbinenko * grub-core/disk/i386/pc/biosdisk.c: Check disk size sanity. diff --git a/grub-core/osdep/linux/blocklist.c b/grub-core/osdep/linux/blocklist.c index f33a7d507..10ddd11c1 100644 --- a/grub-core/osdep/linux/blocklist.c +++ b/grub-core/osdep/linux/blocklist.c @@ -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)