summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-09-21 12:57:01 +0100
committerDr. Stephen Henson <steve@openssl.org>2016-09-21 20:00:46 +0100
commitaa388af1e18988894a48b8f64ae994eaa4366d5d (patch)
treefe7c6f70d043518e49e4667ad85e6ed96a070593
parent52e623c4cb06fffa9d5e75c60b34b4bc130b12e9 (diff)
Remove unnecessary check.
The overflow check will never be triggered because the the n2l3 result is always less than 2^24. Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 709ec8b3848e2ac201b86f49c5561debb8572ccd)
-rw-r--r--ssl/s3_both.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/ssl/s3_both.c b/ssl/s3_both.c
index c51fc6ea01..498e3975f5 100644
--- a/ssl/s3_both.c
+++ b/ssl/s3_both.c
@@ -497,11 +497,6 @@ long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok)
SSLerr(SSL_F_SSL3_GET_MESSAGE, SSL_R_EXCESSIVE_MESSAGE_SIZE);
goto f_err;
}
- if (l > (INT_MAX - 4)) { /* BUF_MEM_grow takes an 'int' parameter */
- al = SSL_AD_ILLEGAL_PARAMETER;
- SSLerr(SSL_F_SSL3_GET_MESSAGE, SSL_R_EXCESSIVE_MESSAGE_SIZE);
- goto f_err;
- }
if (l && !BUF_MEM_grow_clean(s->init_buf, (int)l + 4)) {
SSLerr(SSL_F_SSL3_GET_MESSAGE, ERR_R_BUF_LIB);
goto err;