* grub-core/disk/AFSplitter.c (AF_merge): Check that mdlen is not 0.
This commit is contained in:
parent
44461d5af2
commit
1dfe3f973e
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/disk/AFSplitter.c (AF_merge): Check that mdlen is not 0.
|
||||||
|
|
||||||
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
|
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/commands/i386/pc/play.c (grub_cmd_play): Avoid
|
* grub-core/commands/i386/pc/play.c (grub_cmd_play): Avoid
|
||||||
|
|
|
@ -76,7 +76,7 @@ AF_merge (const gcry_md_spec_t * hash, grub_uint8_t * src, grub_uint8_t * dst,
|
||||||
if (bufblock == NULL)
|
if (bufblock == NULL)
|
||||||
return GPG_ERR_OUT_OF_MEMORY;
|
return GPG_ERR_OUT_OF_MEMORY;
|
||||||
|
|
||||||
if (hash->mdlen > GRUB_CRYPTO_MAX_MDLEN)
|
if (hash->mdlen > GRUB_CRYPTO_MAX_MDLEN || hash->mdlen == 0)
|
||||||
return GPG_ERR_INV_ARG;
|
return GPG_ERR_INV_ARG;
|
||||||
|
|
||||||
grub_memset (bufblock, 0, blocksize);
|
grub_memset (bufblock, 0, blocksize);
|
||||||
|
|
Loading…
Reference in a new issue