summaryrefslogtreecommitdiff
path: root/src/lib/libssl/t1_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/t1_lib.c')
-rw-r--r--src/lib/libssl/t1_lib.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/libssl/t1_lib.c b/src/lib/libssl/t1_lib.c
index 090259cf1f..0a5958341b 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.94 2016/11/05 08:26:37 jsing Exp $ */ 1/* $OpenBSD: t1_lib.c,v 1.95 2016/12/18 13:52: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 *
@@ -1607,14 +1607,13 @@ ssl_next_proto_validate(const unsigned char *d, unsigned int len)
1607} 1607}
1608 1608
1609int 1609int
1610ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d, 1610ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, size_t n, int *al)
1611 int n, int *al)
1612{ 1611{
1613 unsigned short type; 1612 unsigned short type;
1614 unsigned short size; 1613 unsigned short size;
1615 unsigned short len; 1614 unsigned short len;
1616 unsigned char *data = *p; 1615 unsigned char *data = *p;
1617 unsigned char *end = d + n; 1616 unsigned char *end = *p + n;
1618 int tlsext_servername = 0; 1617 int tlsext_servername = 0;
1619 int renegotiate_seen = 0; 1618 int renegotiate_seen = 0;
1620 1619
@@ -1790,7 +1789,7 @@ ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d,
1790 1789
1791 } 1790 }
1792 1791
1793 if (data != d + n) { 1792 if (data != end) {
1794 *al = SSL_AD_DECODE_ERROR; 1793 *al = SSL_AD_DECODE_ERROR;
1795 return 0; 1794 return 0;
1796 } 1795 }