diff options
author | markus <> | 2002-09-12 20:53:05 +0000 |
---|---|---|
committer | markus <> | 2002-09-12 20:53:05 +0000 |
commit | 31392c89d1135cf2a416f97295f6d21681b3fbc4 (patch) | |
tree | 09ce0b27981cae5a4625fa506a24d5c79fc8a13a /src/lib/libssl/s3_clnt.c | |
parent | 715a204e4615e4a70a466fcb383a9a57cad5e6b8 (diff) | |
download | openbsd-31392c89d1135cf2a416f97295f6d21681b3fbc4.tar.gz openbsd-31392c89d1135cf2a416f97295f6d21681b3fbc4.tar.bz2 openbsd-31392c89d1135cf2a416f97295f6d21681b3fbc4.zip |
import openssl-0.9.7-stable-SNAP-20020911 (without idea)
Diffstat (limited to 'src/lib/libssl/s3_clnt.c')
-rw-r--r-- | src/lib/libssl/s3_clnt.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/libssl/s3_clnt.c b/src/lib/libssl/s3_clnt.c index 2699b5863b..2b58482484 100644 --- a/src/lib/libssl/s3_clnt.c +++ b/src/lib/libssl/s3_clnt.c | |||
@@ -546,7 +546,11 @@ static int ssl3_client_hello(SSL *s) | |||
546 | *(p++)=i; | 546 | *(p++)=i; |
547 | if (i != 0) | 547 | if (i != 0) |
548 | { | 548 | { |
549 | die(i <= sizeof s->session->session_id); | 549 | if (i > sizeof s->session->session_id) |
550 | { | ||
551 | SSLerr(SSL_F_SSL3_CLIENT_HELLO, ERR_R_INTERNAL_ERROR); | ||
552 | goto err; | ||
553 | } | ||
550 | memcpy(p,s->session->session_id,i); | 554 | memcpy(p,s->session->session_id,i); |
551 | p+=i; | 555 | p+=i; |
552 | } | 556 | } |
@@ -1598,7 +1602,11 @@ static int ssl3_send_client_key_exchange(SSL *s) | |||
1598 | SSL_MAX_MASTER_KEY_LENGTH); | 1602 | SSL_MAX_MASTER_KEY_LENGTH); |
1599 | EVP_EncryptFinal_ex(&ciph_ctx,&(epms[outl]),&padl); | 1603 | EVP_EncryptFinal_ex(&ciph_ctx,&(epms[outl]),&padl); |
1600 | outl += padl; | 1604 | outl += padl; |
1601 | die(outl <= sizeof epms); | 1605 | if (outl > sizeof epms) |
1606 | { | ||
1607 | SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); | ||
1608 | goto err; | ||
1609 | } | ||
1602 | EVP_CIPHER_CTX_cleanup(&ciph_ctx); | 1610 | EVP_CIPHER_CTX_cleanup(&ciph_ctx); |
1603 | 1611 | ||
1604 | /* KerberosWrapper.EncryptedPreMasterSecret */ | 1612 | /* KerberosWrapper.EncryptedPreMasterSecret */ |