* grub-core/lib/crypto.c (grub_crypto_hash): Remove variable length
array.
This commit is contained in:
parent
ca120e31f2
commit
7dd0a30361
4 changed files with 21 additions and 1 deletions
|
@ -125,7 +125,10 @@ void
|
|||
grub_crypto_hash (const gcry_md_spec_t *hash, void *out, const void *in,
|
||||
grub_size_t inlen)
|
||||
{
|
||||
grub_uint8_t ctx[hash->contextsize];
|
||||
GRUB_PROPERLY_ALIGNED_ARRAY (ctx, GRUB_CRYPTO_MAX_MD_CONTEXT_SIZE);
|
||||
|
||||
if (hash->contextsize > sizeof (ctx))
|
||||
grub_fatal ("Too large md context");
|
||||
hash->init (&ctx);
|
||||
hash->write (&ctx, in, inlen);
|
||||
hash->final (&ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue