summaryrefslogtreecommitdiffstats
path: root/crypto/evp/evp_lib.c
diff options
context:
space:
mode:
authorRalf S. Engelschall <rse@openssl.org>1998-12-21 11:00:56 +0000
committerRalf S. Engelschall <rse@openssl.org>1998-12-21 11:00:56 +0000
commitdfeab0689f69c0b4bd3480ffd37a9cacc2f17d9c (patch)
tree2f74e0cfd76a9e092548a9bf52e579aef984299b /crypto/evp/evp_lib.c
parent58964a492275ca9a59a0cd9c8155cb2491b4b909 (diff)
Import of old SSLeay release: SSLeay 0.9.1b (unreleased)SSLeay
Diffstat (limited to 'crypto/evp/evp_lib.c')
-rw-r--r--crypto/evp/evp_lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/evp/evp_lib.c b/crypto/evp/evp_lib.c
index 69784eb555..729fc8f4e6 100644
--- a/crypto/evp/evp_lib.c
+++ b/crypto/evp/evp_lib.c
@@ -97,7 +97,10 @@ ASN1_TYPE *type;
{
l=EVP_CIPHER_CTX_iv_length(c);
i=ASN1_TYPE_get_octetstring(type,c->oiv,l);
- memcpy(c->iv,c->oiv,l);
+ if (i != l)
+ return(-1);
+ else if (i > 0)
+ memcpy(c->iv,c->oiv,l);
}
return(i);
}