From 8dcbe03b8259462c60c30b8c49799973b813bb93 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 6 Jun 2012 12:42:11 +0200 Subject: [PATCH] * util/grub-fstest.c (cmd_crc): Use grub_get_unaligned32 for safety. --- ChangeLog | 4 ++++ util/grub-fstest.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f67df7648..d6557da2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-06-06 Vladimir Serbinenko + + * util/grub-fstest.c (cmd_crc): Use grub_get_unaligned32 for safety. + 2012-06-06 Vladimir Serbinenko * grub-core/disk/pata.c (grub_pata_pio_read) diff --git a/util/grub-fstest.c b/util/grub-fstest.c index 5cf82a968..a546b75fe 100644 --- a/util/grub-fstest.c +++ b/util/grub-fstest.c @@ -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;