summaryrefslogtreecommitdiff
path: root/lib/libssl/s3_clnt.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-06-21 20:27:26 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-06-21 20:27:26 +0000
commit8915222daf2926bd357aae0eb1171eb70390994e (patch)
tree74a244fd2ad0ccd77db425b31e95da33cbaf4cbc /lib/libssl/s3_clnt.c
parentcef9f704bf7ff1454d28aa9fc3d7ff4f6b0365e5 (diff)
always compare memcmp against 0, for clarity.
Diffstat (limited to 'lib/libssl/s3_clnt.c')
-rw-r--r--lib/libssl/s3_clnt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/s3_clnt.c b/lib/libssl/s3_clnt.c
index 7257ba566d3..03500190785 100644
--- a/lib/libssl/s3_clnt.c
+++ b/lib/libssl/s3_clnt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s3_clnt.c,v 1.71 2014/06/19 21:29:51 tedu Exp $ */
+/* $OpenBSD: s3_clnt.c,v 1.72 2014/06/21 20:27:25 tedu Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -886,7 +886,7 @@ ssl3_get_server_hello(SSL *s)
timingsafe_memcmp(p, s->session->session_id, j) == 0) {
if (s->sid_ctx_length != s->session->sid_ctx_length ||
timingsafe_memcmp(s->session->sid_ctx,
- s->sid_ctx, s->sid_ctx_length)) {
+ s->sid_ctx, s->sid_ctx_length) != 0) {
/* actually a client application bug */
al = SSL_AD_ILLEGAL_PARAMETER;
SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,