Commit f1959b16 authored by Vladimir Serbinenko's avatar Vladimir Serbinenko
Browse files

* grub-core/disk/ieee1275/nand.c (grub_nand_open): Check block size

	validity.
parent 93586351
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/disk/ieee1275/nand.c (grub_nand_open): Check block size
validity.
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com> 2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
   
* grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Do not * grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Do not
...@@ -113,6 +113,11 @@ grub_nand_open (const char *name, grub_disk_t disk) ...@@ -113,6 +113,11 @@ grub_nand_open (const char *name, grub_disk_t disk)
} }
data->block_size = (args.size1 >> GRUB_DISK_SECTOR_BITS); data->block_size = (args.size1 >> GRUB_DISK_SECTOR_BITS);
if (!data->block_size)
{
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "invalid block size");
goto fail;
}
INIT_IEEE1275_COMMON (&args.common, "call-method", 2, 3); INIT_IEEE1275_COMMON (&args.common, "call-method", 2, 3);
args.method = (grub_ieee1275_cell_t) "size"; args.method = (grub_ieee1275_cell_t) "size";
......
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