aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/evp/evp_lib.c
diff options
context:
space:
mode:
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);