aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/openssl/ssl/ssl_asn1.c
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2002-08-10 01:46:10 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2002-08-10 01:46:10 +0000
commit484549566e495cb042684cec327d66f24e6fec1d (patch)
tree3c9559c80a7fe01c85e2dfbadcb9f84770a7e8e6 /crypto/openssl/ssl/ssl_asn1.c
parent9e6c5d1742cb27b1af95f09cda6cf8b330590e03 (diff)
downloadsrc-484549566e495cb042684cec327d66f24e6fec1d.tar.gz
src-484549566e495cb042684cec327d66f24e6fec1d.zip
Import of OpenSSL 0.9.6f.
Notes
Notes: svn path=/vendor-crypto/openssl/dist/; revision=101615
Diffstat (limited to 'crypto/openssl/ssl/ssl_asn1.c')
-rw-r--r--crypto/openssl/ssl/ssl_asn1.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/openssl/ssl/ssl_asn1.c b/crypto/openssl/ssl/ssl_asn1.c
index 3de1dbc42e79..00f9fda357ae 100644
--- a/crypto/openssl/ssl/ssl_asn1.c
+++ b/crypto/openssl/ssl/ssl_asn1.c
@@ -273,10 +273,11 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp,
i=SSL2_MAX_SSL_SESSION_ID_LENGTH;
if (os.length > i)
- os.length=i;
+ os.length = i;
+ if (os.length > sizeof ret->session_id) /* can't happen */
+ os.length = sizeof ret->session_id;
ret->session_id_length=os.length;
- die(os.length <= sizeof ret->session_id);
memcpy(ret->session_id,os.data,os.length);
M_ASN1_D2I_get(osp,d2i_ASN1_OCTET_STRING);