diff --git a/ChangeLog b/ChangeLog index 99f8a7bbe..b7a5b02f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-12-13 Vladimir Serbinenko + + * grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Change pointer + arithmetic to conserve alignment invariants. + 2011-12-13 Vladimir Serbinenko * include/grub/efiemu/efiemu.h (grub_efiemu_get_memory_map): Remove diff --git a/grub-core/disk/mdraid_linux.c b/grub-core/disk/mdraid_linux.c index 0e2d85009..7ee513d26 100644 --- a/grub-core/disk/mdraid_linux.c +++ b/grub-core/disk/mdraid_linux.c @@ -216,11 +216,11 @@ grub_mdraid_detect (grub_disk_t disk, struct grub_raid_array *array, array->chunk_size = grub_le_to_cpu32 (sb.chunk_size) >> 9; array->index = grub_le_to_cpu32 (sb.this_disk.number); array->uuid_len = 16; - array->uuid = grub_malloc (16); + uuid = grub_malloc (16); + array->uuid = (char *) uuid; if (!array->uuid) return grub_errno; - uuid = (grub_uint32_t *) array->uuid; uuid[0] = grub_swap_bytes32 (sb.set_uuid0); uuid[1] = grub_swap_bytes32 (sb.set_uuid1); uuid[2] = grub_swap_bytes32 (sb.set_uuid2);