mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
* grub-core/disk/ieee1275/nand.c (grub_nand_open): Check block size
validity.
This commit is contained in:
1 parent
935863518f
commit
f1959b1695
2 files changed
+10
No files matched your search
@@ -113,6 +113,11 @@ grub_nand_open (const char *name, grub_disk_t disk)
|
||||
}
|
||||
|
||||
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);
|
||||
args.method = (grub_ieee1275_cell_t) "size";
|
||||
|
||||
Reference in new issue
Block a user