From: Matt Caswell Date: Fri, 30 Oct 2015 16:39:29 +0000 (+0000) Subject: Remove a trivially true OPENSSL_assert X-Git-Tag: OpenSSL_1_1_0-pre1~319 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=267b7789f83f7177c96a308a7b30ce4c234ceb52;p=openssl Remove a trivially true OPENSSL_assert This OPENSSL_assert in (d)tls1_hearbeat is trivially always going to be true because it is testing the sum of values that have been set as constants just a few lines above and nothing has changed them. Therefore remove this. Reviewed-by: Rich Salz --- diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index 733973b332..b865ad42b2 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -1023,12 +1023,6 @@ int dtls1_heartbeat(SSL *s) return -1; } - /* - * Check if padding is too long, payload and padding must not exceed 2^14 - * - 3 = 16381 bytes in total. - */ - OPENSSL_assert(payload + padding <= 16381); - /*- * Create HeartBeat message, we just use a sequence number * as payload to distuingish different messages and add diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index f42fb64700..2db0d74ab1 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -3685,12 +3685,6 @@ int tls1_heartbeat(SSL *s) return -1; } - /* - * Check if padding is too long, payload and padding must not exceed 2^14 - * - 3 = 16381 bytes in total. - */ - OPENSSL_assert(payload + padding <= 16381); - /*- * Create HeartBeat message, we just use a sequence number * as payload to distuingish different messages and add