diff options
author | nectar <nectar@FreeBSD.org> | 2002-07-30 13:38:06 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2002-07-30 13:38:06 +0000 |
commit | 9b2d8504539be7c47e0a668f28f683954960e251 (patch) | |
tree | 452372b320a4ccc86f09651553392a2a8f3794be /crypto/openssl/ssl/s3_clnt.c | |
parent | 86b15117de99802621746d29e72559dfc406c288 (diff) | |
parent | 2f13e0916590f8488178999aec4874ed5662a031 (diff) | |
download | FreeBSD-src-9b2d8504539be7c47e0a668f28f683954960e251.zip FreeBSD-src-9b2d8504539be7c47e0a668f28f683954960e251.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r100936,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'crypto/openssl/ssl/s3_clnt.c')
-rw-r--r-- | crypto/openssl/ssl/s3_clnt.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/openssl/ssl/s3_clnt.c b/crypto/openssl/ssl/s3_clnt.c index 89ad45a..b921d9a 100644 --- a/crypto/openssl/ssl/s3_clnt.c +++ b/crypto/openssl/ssl/s3_clnt.c @@ -117,6 +117,7 @@ #include <openssl/sha.h> #include <openssl/evp.h> #include "ssl_locl.h" +#include "cryptlib.h" static SSL_METHOD *ssl3_get_client_method(int ver); static int ssl3_client_hello(SSL *s); @@ -545,6 +546,7 @@ static int ssl3_client_hello(SSL *s) *(p++)=i; if (i != 0) { + die(i <= sizeof s->session->session_id); memcpy(p,s->session->session_id,i); p+=i; } @@ -626,6 +628,14 @@ static int ssl3_get_server_hello(SSL *s) /* get the session-id */ j= *(p++); + if(j > sizeof s->session->session_id) + { + al=SSL_AD_ILLEGAL_PARAMETER; + SSLerr(SSL_F_SSL3_GET_SERVER_HELLO, + SSL_R_SSL3_SESSION_ID_TOO_LONG); + goto f_err; + } + if ((j != 0) && (j != SSL3_SESSION_ID_SIZE)) { /* SSLref returns 16 :-( */ |