提交 1ae3fdbe 编写于 作者: A Adam Langley 提交者: Matt Caswell

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: NRichard Levitte <levitte@openssl.org>
Reviewed-by: NMatt Caswell <matt@openssl.org>
上级 4b464e7b
...@@ -1940,12 +1940,12 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, ...@@ -1940,12 +1940,12 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p,
s->srtp_profile = NULL; s->srtp_profile = NULL;
if (data >= (d + n - 2)) { if (data == d + n)
if (data != d + n) goto ri_check;
goto err;
else if (data > (d + n - 2))
goto ri_check; goto err;
}
n2s(data, len); n2s(data, len);
if (data > (d + n - len)) if (data > (d + n - len))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册