summaryrefslogtreecommitdiffstats
path: root/ssl/s23_clnt.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2011-03-12 12:18:34 +0000
committerBen Laurie <ben@openssl.org>2011-03-12 12:18:34 +0000
commit4bd48de60c210645432b55d177d41d2a64ba40b6 (patch)
tree162711dd40bc9ec5b01fb570bbc1d95f2fb907cd /ssl/s23_clnt.c
parent2eab92f8e3017a3a34f38d6fb0d76a0466e324f7 (diff)
Fix warning.
Diffstat (limited to 'ssl/s23_clnt.c')
-rw-r--r--ssl/s23_clnt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c
index e6f9bf952a..ba882fef43 100644
--- a/ssl/s23_clnt.c
+++ b/ssl/s23_clnt.c
@@ -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)))
{