summaryrefslogtreecommitdiffstats
path: root/crypto/evp/evp_key.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2002-11-13 16:43:43 +0100
committerBen Laurie <ben@openssl.org>2002-11-13 16:43:43 +0100
commit54a656ef081f72a740c550ebd8099b40b8b5cde0 (patch)
tree9b3638b56848c7f0648b84cfa7ad056116b37a1b /crypto/evp/evp_key.c
parentWhen build as dynamic engines, the loading functions should be defined (diff)
downloadopenssl-54a656ef081f72a740c550ebd8099b40b8b5cde0.tar.xz
openssl-54a656ef081f72a740c550ebd8099b40b8b5cde0.zip
Security fixes brought forward from 0.9.7.
Diffstat (limited to 'crypto/evp/evp_key.c')
-rw-r--r--crypto/evp/evp_key.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/evp/evp_key.c b/crypto/evp/evp_key.c
index 4271393069..dc103bd1d7 100644
--- a/crypto/evp/evp_key.c
+++ b/crypto/evp/evp_key.c
@@ -118,6 +118,8 @@ int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,
nkey=type->key_len;
niv=type->iv_len;
+ OPENSSL_assert(nkey <= EVP_MAX_KEY_LENGTH);
+ OPENSSL_assert(niv <= EVP_MAX_IV_LENGTH);
if (data == NULL) return(nkey);