summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libssl/t1_lib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c
index 5ca0a1f4a0..b69e52a85c 100644
--- a/src/lib/libssl/t1_lib.c
+++ b/src/lib/libssl/t1_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_lib.c,v 1.107 2017/01/24 03:41:43 jsing Exp $ */ 1/* $OpenBSD: t1_lib.c,v 1.108 2017/01/24 08:41:53 jsing 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 *
@@ -752,9 +752,9 @@ ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned char *limit)
752 return NULL; 752 return NULL;
753 753
754 lenmax = limit - ret - 6; 754 lenmax = limit - ret - 6;
755 if (curveslen > lenmax) 755 if (curveslen * 2 > lenmax)
756 return NULL; 756 return NULL;
757 if (curveslen > 65532) { 757 if (curveslen * 2 > 65532) {
758 SSLerr(SSL_F_SSL_ADD_CLIENTHELLO_TLSEXT, 758 SSLerr(SSL_F_SSL_ADD_CLIENTHELLO_TLSEXT,
759 ERR_R_INTERNAL_ERROR); 759 ERR_R_INTERNAL_ERROR);
760 return NULL; 760 return NULL;