From 267b7789f83f7177c96a308a7b30ce4c234ceb52 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 30 Oct 2015 16:39:29 +0000 Subject: [PATCH] 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 --- ssl/d1_lib.c | 6 ------ ssl/t1_lib.c | 6 ------ 2 files changed, 12 deletions(-) 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 -- 2.34.1