summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_sess.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2002-08-02 11:48:15 +0000
committerBodo Möller <bodo@openssl.org>2002-08-02 11:48:15 +0000
commit5574e0ed417c9a09487a270fec3df34d3094f5c6 (patch)
treeae3a9a39081ea1b5a01482dd15f6f8b259fa93e9 /ssl/ssl_sess.c
parent042e57d5628244b121836881c433b6fa2b6f1697 (diff)
get rid of OpenSSLDie
Diffstat (limited to 'ssl/ssl_sess.c')
-rw-r--r--ssl/ssl_sess.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c
index 8bfc382bb6..ca1a7427be 100644
--- a/ssl/ssl_sess.c
+++ b/ssl/ssl_sess.c
@@ -251,7 +251,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;