summaryrefslogtreecommitdiffstats
path: root/crypto/evp/evp_lib.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2002-11-13 15:43:43 +0000
committerBen Laurie <ben@openssl.org>2002-11-13 15:43:43 +0000
commit54a656ef081f72a740c550ebd8099b40b8b5cde0 (patch)
tree9b3638b56848c7f0648b84cfa7ad056116b37a1b /crypto/evp/evp_lib.c
parent8f797f14b8ff7d3d5cb04443284259a0c94860b3 (diff)
Security fixes brought forward from 0.9.7.
Diffstat (limited to 'crypto/evp/evp_lib.c')
-rw-r--r--crypto/evp/evp_lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/evp/evp_lib.c b/crypto/evp/evp_lib.c
index a431945ef5..52a3b287be 100644
--- a/crypto/evp/evp_lib.c
+++ b/crypto/evp/evp_lib.c
@@ -90,6 +90,7 @@ int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
if (type != NULL)
{
l=EVP_CIPHER_CTX_iv_length(c);
+ OPENSSL_assert(l <= sizeof c->iv);
i=ASN1_TYPE_get_octetstring(type,c->oiv,l);
if (i != l)
return(-1);
@@ -106,6 +107,7 @@ int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
if (type != NULL)
{
j=EVP_CIPHER_CTX_iv_length(c);
+ OPENSSL_assert(j <= sizeof c->iv);
i=ASN1_TYPE_set_octetstring(type,c->oiv,j);
}
return(i);