summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2015-06-12 08:05:49 +0100
committerMatt Caswell <matt@openssl.org>2015-06-12 15:43:02 +0100
commitfe64245aa1b1f5519ddfe11e3c9d7ad49ae4de95 (patch)
tree02ed187e486e254fce798695274db3408246b0a3
parent1030f89f5ea238820645e3d34049eb1bd30e81c4 (diff)
Allow a zero length extension block
It is valid for an extension block to be present in a ClientHello, but to be of zero length. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
-rw-r--r--ssl/t1_lib.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index d811d3fdb8..210a5e8743 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -2016,12 +2016,12 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p,
s->srtp_profile = NULL;
- if (data >= (d + n - 2)) {
- if (data != d + n)
- goto err;
- else
- goto ri_check;
- }
+ if (data == d + n)
+ goto ri_check;
+
+ if (data > (d + n - 2))
+ goto err;
+
n2s(data, len);
if (data > (d + n - len))