Fix warning.
authorBen Laurie <ben@openssl.org>
Sat, 12 Mar 2011 12:18:34 +0000 (12:18 +0000)
committerBen Laurie <ben@openssl.org>
Sat, 12 Mar 2011 12:18:34 +0000 (12:18 +0000)
ssl/s23_clnt.c

index e6f9bf952a0f2198e106e868f18932f27300f394..ba882fef43880d6962f25a2aee75f07a2f51982c 100644 (file)
@@ -619,7 +619,12 @@ static int ssl23_get_server_hello(SSL *s)
 #endif
                }
        else if (p[1] == SSL3_VERSION_MAJOR &&
-                (p[2] >= SSL3_VERSION_MINOR && p[2] <= TLS1_1_VERSION_MINOR) &&
+#if SSL3_VERSION_MINOR == 0
+                /* p[2] is inevitably >= 0 */
+                p[2] <= TLS1_1_VERSION_MINOR &&
+#else
+                p[2] >= SSL3_VERSION_MINOR && p[2] <= TLS1_1_VERSION_MINOR &&
+#endif
                 ((p[0] == SSL3_RT_HANDSHAKE && p[5] == SSL3_MT_SERVER_HELLO) ||
                  (p[0] == SSL3_RT_ALERT && p[3] == 0 && p[4] == 2)))
                {