grub-core/lib/pbkdf2.c (grub_crypto_pbkdf2): Check that hash len is not 0.

This commit is contained in:
Vladimir Serbinenko 2015-01-20 15:26:09 +01:00
parent 111ab3b9cc
commit 065ed900d4
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/lib/pbkdf2.c (grub_crypto_pbkdf2): Check that hash len is not 0.
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com> 2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/osdep/linux/blocklist.c (grub_install_get_blocklist): Check * grub-core/osdep/linux/blocklist.c (grub_install_get_blocklist): Check

View file

@ -52,7 +52,7 @@ grub_crypto_pbkdf2 (const struct gcry_md_spec *md,
grub_uint8_t *tmp; grub_uint8_t *tmp;
grub_size_t tmplen = Slen + 4; grub_size_t tmplen = Slen + 4;
if (md->mdlen > GRUB_CRYPTO_MAX_MDLEN) if (md->mdlen > GRUB_CRYPTO_MAX_MDLEN || md->mdlen == 0)
return GPG_ERR_INV_ARG; return GPG_ERR_INV_ARG;
if (c == 0) if (c == 0)