Use GRUB_PROPERLY_ALIGNED_ARRAY in grub-core/disk/cryptodisk.c and

grub-core/disk/geli.c.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-04-05 13:26:10 +02:00
parent 132867de71
commit eeada7b1da
3 changed files with 7 additions and 2 deletions

View file

@ -146,7 +146,7 @@ geli_rekey (struct grub_cryptodisk *dev, grub_uint64_t zoneno)
grub_uint64_t zone;
} __attribute__ ((packed)) tohash
= { {'e', 'k', 'e', 'y'}, grub_cpu_to_le64 (zoneno) };
grub_uint64_t key[(dev->hash->mdlen + 7) / 8];
GRUB_PROPERLY_ALIGNED_ARRAY (key, dev->hash->mdlen);
grub_dprintf ("geli", "rekeying %" PRIuGRUB_UINT64_T " keysize=%d\n",
zoneno, dev->rekey_derived_size);