From 709ec8b3848e2ac201b86f49c5561debb8572ccd Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Wed, 21 Sep 2016 12:57:01 +0100 Subject: [PATCH] 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 --- ssl/s3_both.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ssl/s3_both.c b/ssl/s3_both.c index 4b636b0e9b..d53275fcf9 100644 --- a/ssl/s3_both.c +++ b/ssl/s3_both.c @@ -415,11 +415,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; -- 2.25.1