Fix a switch statement fallthrough
authorMatt Caswell <matt@openssl.org>
Sun, 10 Dec 2017 09:55:08 +0000 (09:55 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 11 Dec 2017 09:46:59 +0000 (09:46 +0000)
SSL_trace() has a case which was inadvertently falling through.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4888)

ssl/t1_trce.c

index 3bb9b6d7e5cc298c281464bd5e74c449a23532b4..76bdf792ae3b885b0da64ebae09252f737bf942e 100644 (file)
@@ -1301,13 +1301,15 @@ void SSL_trace(int write_p, int version, int content_type,
         break;
 
     case SSL3_RT_ALERT:
-        if (msglen != 2)
+        if (msglen != 2) {
             BIO_puts(bio, "    Illegal Alert Length\n");
-        else {
+        else {
             BIO_printf(bio, "    Level=%s(%d), description=%s(%d)\n",
                        SSL_alert_type_string_long(msg[0] << 8),
                        msg[0], SSL_alert_desc_string_long(msg[1]), msg[1]);
         }
+        break;
+
     case DTLS1_RT_HEARTBEAT:
         ssl_print_heartbeat(bio, 4, msg, msglen);
         break;