Commit 267b7789 authored by Matt Caswell's avatar Matt Caswell
Browse files

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: default avatarRich Salz <rsalz@openssl.org>
parent 9f07c405
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -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
+0 −6
Original line number Diff line number Diff line
@@ -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