summaryrefslogtreecommitdiff
path: root/lib/libssl/ssl_sess.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2002-09-14 11:18:05 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2002-09-14 11:18:05 +0000
commitf4428d8101c504f427625270a1dfb1d4be89987f (patch)
treeee462389672345f98c9a6edd8bbded5bb36bd3d0 /lib/libssl/ssl_sess.c
parent7d5614b00acb8f7a6a52cac536b12db6326859c3 (diff)
merge with openssl-0.9.7-stable-SNAP-20020911,
new minor for libcrypto (_X509_REQ_print_ex) tested by miod@, pb@
Diffstat (limited to 'lib/libssl/ssl_sess.c')
-rw-r--r--lib/libssl/ssl_sess.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libssl/ssl_sess.c b/lib/libssl/ssl_sess.c
index a0c3100b29f..664f8c22305 100644
--- a/lib/libssl/ssl_sess.c
+++ b/lib/libssl/ssl_sess.c
@@ -250,7 +250,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, ERR_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;