Visual Studio 2017 debug build warning error on 32 bit build
[openssl.git] / ssl / t1_trce.c
index d3f67f5b2a6e33de2c75aeb27e1f429f96228b55..394df980a0aca332ac24b9361b9b97313f56df39 100644 (file)
@@ -1504,7 +1504,8 @@ void SSL_trace(int write_p, int version, int content_type,
             int hvers;
 
             /* avoid overlapping with length at the end of buffer */
-            if (msglen < (SSL_IS_DTLS(ssl) ? 13 : 5)) {
+            if (msglen < (size_t)(SSL_IS_DTLS(ssl) ?
+                        DTLS1_RT_HEADER_LENGTH : SSL3_RT_HEADER_LENGTH)) {
                 BIO_puts(bio, write_p ? "Sent" : "Received");
                 ssl_print_hex(bio, 0, " too short message", msg, msglen);
                 break;