* grub-core/lib/crypto.c (grub_crypto_hash): Remove variable length

array.
This commit is contained in:
Vladimir Serbinenko committed 2013-11-20 20:09:18 +01:00
1 parent ca120e31f2
commit 7dd0a30361
4 files changed
+21 -1

No files matched your search

+4 -1
View File
@@ -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);