From 5ccaf90415346076b5ad8377dfd33899ddb4f0e4 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Tue, 12 Nov 2013 01:20:45 +0100 Subject: [PATCH] * include/grub/crypto.h: Add maximums on hash size and cipher block size. --- ChangeLog | 5 +++++ include/grub/crypto.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5ea79f136..3d8ba00e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-11-12 Vladimir Serbinenko + + * include/grub/crypto.h: Add maximums on hash size and cipher block + size. + 2013-11-12 Vladimir Serbinenko * grub-core/commands/xnu_uuid.c: Remove variable length arrays. diff --git a/include/grub/crypto.h b/include/grub/crypto.h index 0e8820ed6..d7ba697c6 100644 --- a/include/grub/crypto.h +++ b/include/grub/crypto.h @@ -85,6 +85,10 @@ enum gcry_cipher_modes }; #endif +/* Don't rely on this. Check! */ +#define GRUB_CRYPTO_MAX_MDLEN 64 +#define GRUB_CRYPTO_MAX_CIPHER_BLOCKSIZE 16 + /* Type for the cipher_setkey function. */ typedef gcry_err_code_t (*gcry_cipher_setkey_t) (void *c, const unsigned char *key,