aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/openssl/ssl/ssl_sess.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_sess.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_sess.c')
-rw-r--r--crypto/openssl/ssl/ssl_sess.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/openssl/ssl/ssl_sess.c b/crypto/openssl/ssl/ssl_sess.c
index 87cd8a9b86c0..2f2d5bc27f7c 100644
--- a/crypto/openssl/ssl/ssl_sess.c
+++ b/crypto/openssl/ssl/ssl_sess.c
@@ -200,7 +200,12 @@ int ssl_get_new_session(SSL *s, int session)
ss->session_id_length=0;
}
- die(s->sid_ctx_length <= sizeof ss->sid_ctx);
+ if (s->sid_ctx_length > sizeof ss->sid_ctx)
+ {
+ SSLerr(SSL_F_SSL_GET_NEW_SESSION, SSL_R_INTERNAL_ERROR);
+ SSL_SESSION_free(ss);
+ return 0;
+ }
memcpy(ss->sid_ctx,s->sid_ctx,s->sid_ctx_length);
ss->sid_ctx_length=s->sid_ctx_length;
s->session=ss;