* grub-core/fs/zfs/zfs.c (zfs_fetch_nvlist): Mark unknown member here
as GRUB_ERR_BUG. Don't malloc if no device is available.
This commit is contained in:
parent
dded554099
commit
b4ba8e025b
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2012-02-12 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/fs/zfs/zfs.c (zfs_fetch_nvlist): Mark unknown member here
|
||||
as GRUB_ERR_BUG. Don't malloc if no device is available.
|
||||
|
||||
2012-02-12 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/term/terminfo.c (grub_terminfo_output_unregister):
|
||||
|
|
|
@ -571,9 +571,12 @@ zfs_fetch_nvlist (struct grub_zfs_device_desc *diskdesc, char **nvlist)
|
|||
{
|
||||
grub_err_t err;
|
||||
|
||||
*nvlist = grub_malloc (VDEV_PHYS_SIZE);
|
||||
*nvlist = 0;
|
||||
|
||||
if (!diskdesc->dev)
|
||||
return grub_error (GRUB_ERR_BAD_FS, "member drive unknown");
|
||||
return grub_error (GRUB_ERR_BUG, "member drive unknown");
|
||||
|
||||
*nvlist = grub_malloc (VDEV_PHYS_SIZE);
|
||||
|
||||
/* Read in the vdev name-value pair list (112K). */
|
||||
err = grub_disk_read (diskdesc->dev->disk, diskdesc->vdev_phys_sector, 0,
|
||||
|
|
Loading…
Reference in a new issue