diff options
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 27df7a5a64..9ce5373b51 100644 --- a/src/lib/libssl/s3_clnt.c +++ b/src/lib/libssl/s3_clnt.c | |||
@@ -545,7 +545,11 @@ static int ssl3_client_hello(SSL *s) | |||
545 | *(p++)=i; | 545 | *(p++)=i; |
546 | if (i != 0) | 546 | if (i != 0) |
547 | { | 547 | { |
548 | die(i <= sizeof s->session->session_id); | 548 | if (i > sizeof s->session->session_id) |
549 | { | ||
550 | SSLerr(SSL_F_SSL3_CLIENT_HELLO, ERR_R_INTERNAL_ERROR); | ||
551 | goto err; | ||
552 | } | ||
549 | memcpy(p,s->session->session_id,i); | 553 | memcpy(p,s->session->session_id,i); |
550 | p+=i; | 554 | p+=i; |
551 | } | 555 | } |
@@ -1597,7 +1601,11 @@ static int ssl3_send_client_key_exchange(SSL *s) | |||
1597 | SSL_MAX_MASTER_KEY_LENGTH); | 1601 | SSL_MAX_MASTER_KEY_LENGTH); |
1598 | EVP_EncryptFinal_ex(&ciph_ctx,&(epms[outl]),&padl); | 1602 | EVP_EncryptFinal_ex(&ciph_ctx,&(epms[outl]),&padl); |
1599 | outl += padl; | 1603 | outl += padl; |
1600 | die(outl <= sizeof epms); | 1604 | if (outl > sizeof epms) |
1605 | { | ||
1606 | SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR); | ||
1607 | goto err; | ||
1608 | } | ||
1601 | EVP_CIPHER_CTX_cleanup(&ciph_ctx); | 1609 | EVP_CIPHER_CTX_cleanup(&ciph_ctx); |
1602 | 1610 | ||
1603 | /* KerberosWrapper.EncryptedPreMasterSecret */ | 1611 | /* KerberosWrapper.EncryptedPreMasterSecret */ |