diff --git a/ChangeLog b/ChangeLog index 086b61ff9..99fcb1f95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-12-13 Vladimir Serbinenko + + * grub-core/fs/ext2.c (grub_ext4_find_leaf): MAke buf as pointer to + properly aligned memory. + (grub_ext2_read_block): Ensure buffer alignment. + 2011-12-13 Vladimir Serbinenko * grub-core/fs/romfs.c (grub_romfs_iterate_dir): Properly align diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c index 0fdf151a2..6eb53d3f8 100644 --- a/grub-core/fs/ext2.c +++ b/grub-core/fs/ext2.c @@ -337,7 +337,7 @@ grub_ext2_blockgroup (struct grub_ext2_data *data, int group, } static struct grub_ext4_extent_header * -grub_ext4_find_leaf (struct grub_ext2_data *data, char *buf, +grub_ext4_find_leaf (struct grub_ext2_data *data, grub_properly_aligned_t *buf, struct grub_ext4_extent_header *ext_block, grub_uint32_t fileblock) { @@ -387,7 +387,7 @@ grub_ext2_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock) if (grub_le_to_cpu32(inode->flags) & EXT4_EXTENTS_FLAG) { - char buf[EXT2_BLOCK_SIZE(data)]; + GRUB_PROPERLY_ALIGNED_ARRAY (buf, EXT2_BLOCK_SIZE(data)); struct grub_ext4_extent_header *leaf; struct grub_ext4_extent *ext; int i;