* grub-core/fs/zfs/zfs.c (nvlist_next_nvpair): Fix improper cast.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-07-14 16:24:18 +02:00
parent af211babd8
commit 68714c4392
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2013-07-14 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/zfs/zfs.c (nvlist_next_nvpair): Fix improper cast.
2013-07-14 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/zfs/zfs_lz4.c: Remove restrict keyword.

View file

@ -839,8 +839,8 @@ nvlist_next_nvpair(const char *nvl, const char *nvpair)
}
}
/* 8 bytes of 0 marks the end of the list */
if (*(grub_uint64_t*)nvpair == 0)
return (NULL);
if (grub_get_unaligned64 (nvpair) == 0)
return NULL;
/*consistency checks*/
if (nvpair + 4 * 3 >= nvl + VDEV_PHYS_SIZE)
{