mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
* grub-core/lib/crypto.c (grub_crypto_hash): Remove variable length
array.
This commit is contained in:
1 parent
ca120e31f2
commit
7dd0a30361
4 files changed
+21
-1
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user