summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2020-05-09 13:54:19 +0000
committertb <>2020-05-09 13:54:19 +0000
commit09c6812a2299fc6ddfccf33df96d6405ff0721a7 (patch)
treeb6c1e8655e3f2a164701119d0b9c384db969b7d9 /src/lib
parent4ada255562a571bc859eaabd939211b3d0608172 (diff)
downloadopenbsd-09c6812a2299fc6ddfccf33df96d6405ff0721a7.tar.gz
openbsd-09c6812a2299fc6ddfccf33df96d6405ff0721a7.tar.bz2
openbsd-09c6812a2299fc6ddfccf33df96d6405ff0721a7.zip
Drop a redundant test. It's effectively doing the same test twice
and if the two lengths differed, the later CBS_write_bytes() would correctly fail anyway. Discussed with jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/ssl_clnt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_clnt.c b/src/lib/libssl/ssl_clnt.c
index ce43a89ca7..a83453d39c 100644
--- a/src/lib/libssl/ssl_clnt.c
+++ b/src/lib/libssl/ssl_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_clnt.c,v 1.64 2020/03/06 16:36:47 tb Exp $ */ 1/* $OpenBSD: ssl_clnt.c,v 1.65 2020/05/09 13:54:19 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -903,8 +903,7 @@ ssl3_get_server_hello(SSL *s)
903 if (!CBS_get_u8_length_prefixed(&cbs, &session_id)) 903 if (!CBS_get_u8_length_prefixed(&cbs, &session_id))
904 goto truncated; 904 goto truncated;
905 905
906 if ((CBS_len(&session_id) > sizeof(s->session->session_id)) || 906 if (CBS_len(&session_id) > SSL3_SESSION_ID_SIZE) {
907 (CBS_len(&session_id) > SSL3_SESSION_ID_SIZE)) {
908 al = SSL_AD_ILLEGAL_PARAMETER; 907 al = SSL_AD_ILLEGAL_PARAMETER;
909 SSLerror(s, SSL_R_SSL3_SESSION_ID_TOO_LONG); 908 SSLerror(s, SSL_R_SSL3_SESSION_ID_TOO_LONG);
910 goto f_err; 909 goto f_err;