aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/openssl/ssl/s3_srvr.c
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2002-08-11 14:14:00 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2002-08-11 14:14:00 +0000
commitf6af5de691b32b554d8b63f002cad139bacc2f71 (patch)
tree768d9e8c56d9503eb7384c6c1ce797a050b1bcc0 /crypto/openssl/ssl/s3_srvr.c
parente0cfaf398a61adaa43b0c62ce76c7f02e1f36b46 (diff)
downloadsrc-f6af5de691b32b554d8b63f002cad139bacc2f71.tar.gz
src-f6af5de691b32b554d8b63f002cad139bacc2f71.zip
MFC: OpenSSL 0.9.6g.
Notes
Notes: svn path=/stable/4/; revision=101680
Diffstat (limited to 'crypto/openssl/ssl/s3_srvr.c')
-rw-r--r--crypto/openssl/ssl/s3_srvr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/openssl/ssl/s3_srvr.c b/crypto/openssl/ssl/s3_srvr.c
index d211fd48cb40..fe1e6890142b 100644
--- a/crypto/openssl/ssl/s3_srvr.c
+++ b/crypto/openssl/ssl/s3_srvr.c
@@ -949,7 +949,11 @@ static int ssl3_send_server_hello(SSL *s)
s->session->session_id_length=0;
sl=s->session->session_id_length;
- die(sl <= sizeof s->session->session_id);
+ if (sl > sizeof s->session->session_id)
+ {
+ SSLerr(SSL_F_SSL3_SEND_SERVER_HELLO, SSL_R_INTERNAL_ERROR);
+ return -1;
+ }
*(p++)=sl;
memcpy(p,s->session->session_id,sl);
p+=sl;