* grub-core/commands/hashsum.c (grub_cmd_hashsum): Align space for

resulting hash as a precaution.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-05-08 14:22:38 +02:00
parent 1739b1fef8
commit 668ea6d26d
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2012-05-08 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/commands/hashsum.c (grub_cmd_hashsum): Align space for
resulting hash as a precaution.
2012-05-08 Vladimir Serbinenko <phcoder@gmail.com> 2012-05-08 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/net/bootp.c (set_env_limn_ro): Replace reserved ':' with * grub-core/net/bootp.c (set_env_limn_ro): Replace reserved ':' with

View file

@ -218,7 +218,7 @@ grub_cmd_hashsum (struct grub_extcmd_context *ctxt,
for (i = 0; i < (unsigned) argc; i++) for (i = 0; i < (unsigned) argc; i++)
{ {
grub_uint8_t result[hash->mdlen]; GRUB_PROPERLY_ALIGNED_ARRAY (result, hash->mdlen);
grub_file_t file; grub_file_t file;
grub_err_t err; grub_err_t err;
unsigned j; unsigned j;
@ -246,7 +246,7 @@ grub_cmd_hashsum (struct grub_extcmd_context *ctxt,
continue; continue;
} }
for (j = 0; j < hash->mdlen; j++) for (j = 0; j < hash->mdlen; j++)
grub_printf ("%02x", result[j]); grub_printf ("%02x", ((grub_uint8_t *) result)[j]);
grub_printf (" %s\n", args[i]); grub_printf (" %s\n", args[i]);
} }