* util/grub-fstest.c (cmd_crc): Use grub_get_unaligned32 for safety.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-06-06 12:42:11 +02:00
parent 5b25873518
commit 8dcbe03b82
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2012-06-06 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-fstest.c (cmd_crc): Use grub_get_unaligned32 for safety.
2012-06-06 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/disk/pata.c (grub_pata_pio_read)

View file

@ -349,7 +349,7 @@ cmd_crc (char *pathname)
read_file (pathname, crc_hook);
GRUB_MD_CRC32->final(crc32_context);
printf ("%08x\n",
grub_be_to_cpu32(*(grub_uint32_t*)GRUB_MD_CRC32->read(crc32_context)));
grub_be_to_cpu32 (grub_get_unaligned32 (GRUB_MD_CRC32->read (crc32_context))));
}
static const char *root = NULL;