mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
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>
This commit is contained in:
parent
4b464e7b46
commit
1ae3fdbe6a
12
ssl/t1_lib.c
12
ssl/t1_lib.c
@ -1940,12 +1940,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))
|
||||
|
Loading…
Reference in New Issue
Block a user