* kern/device.c (grub_device_iterate): Allocate new part_ent
structure based on sizeof (*p) rather than sizeof (p->next), to
account for structure padding.
* util/grub-probe.c (probe_raid_level): Return -1 immediately if
disk is NULL, which might happen for LVM physical volumes with no
LVM signature.
+2010-01-20 Dan Merillat <debian@dan.merillat.org>
+
+ * kern/device.c (grub_device_iterate): Allocate new part_ent
+ structure based on sizeof (*p) rather than sizeof (p->next), to
+ account for structure padding.
+
+ * util/grub-probe.c (probe_raid_level): Return -1 immediately if
+ disk is NULL, which might happen for LVM physical volumes with no
+ LVM signature.
+
2009-12-20 Robert Millan <rmh.grub@aybabtu.com>
* loader/mips/linux.c (grub_cmd_initrd)
if (! partition_name)
return 1;
- p = grub_malloc (sizeof (p->next) + grub_strlen (disk->name) + 1 +
+ p = grub_malloc (sizeof (*p) + grub_strlen (disk->name) + 1 +
grub_strlen (partition_name) + 1);
if (!p)
{
static int
probe_raid_level (grub_disk_t disk)
{
+ /* disk might be NULL in the case of a LVM physical volume with no LVM
+ signature. Ignore such cases here. */
+ if (!disk)
+ return -1;
+
if (disk->dev->id != GRUB_DISK_DEVICE_RAID_ID)
return -1;