* grub-core/disk/AFSplitter.c: Remove variable length arrays.

* grub-core/disk/cryptodisk.c: Likewise.
	* grub-core/disk/geli.c: Likewise.
	* grub-core/disk/luks.c: Likewise.
This commit is contained in:
Vladimir Serbinenko 2013-11-12 02:48:02 +01:00
parent 15decd26cc
commit c35fcdc0b7
5 changed files with 61 additions and 23 deletions

View file

@ -37,8 +37,8 @@ diffuse (const gcry_md_spec_t * hash, grub_uint8_t * src,
grub_size_t fullblocks = size / hash->mdlen;
int padding = size % hash->mdlen;
grub_uint8_t final[hash->mdlen];
grub_uint8_t temp[sizeof (IV) + hash->mdlen];
grub_uint8_t final[GRUB_CRYPTO_MAX_MDLEN];
grub_uint8_t temp[sizeof (IV) + GRUB_CRYPTO_MAX_MDLEN];
/* hash block the whole data set with different IVs to produce
* more than just a single data block
@ -76,6 +76,9 @@ AF_merge (const gcry_md_spec_t * hash, grub_uint8_t * src, grub_uint8_t * dst,
if (bufblock == NULL)
return GPG_ERR_OUT_OF_MEMORY;
if (hash->mdlen > GRUB_CRYPTO_MAX_MDLEN)
return GPG_ERR_INV_ARG;
grub_memset (bufblock, 0, blocksize);
for (i = 0; i < blocknumbers - 1; i++)
{