diff options
author | Bodo Möller <bodo@openssl.org> | 2011-02-08 17:48:41 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2011-02-08 17:48:41 +0000 |
commit | 8c93c4dd42e65ef907d012d7be304cec5d2faa12 (patch) | |
tree | d941df12709035a74760f8175af442b4513a4c96 /ssl/t1_lib.c | |
parent | 45d63a54081d64f6b65be4ec4d1616b1f7f01bcb (diff) |
OCSP stapling fix (OpenSSL 0.9.8r/1.0.0d)
Submitted by: Neel Mehta, Adam Langley, Bodo Moeller
Diffstat (limited to 'ssl/t1_lib.c')
-rw-r--r-- | ssl/t1_lib.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 4efa20af2d..ce9b505dd1 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -917,6 +917,7 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in } n2s(data, idsize); dsize -= 2 + idsize; + size -= 2 + idsize; if (dsize < 0) { *al = SSL_AD_DECODE_ERROR; @@ -955,9 +956,14 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in } /* Read in request_extensions */ + if (size < 2) + { + *al = SSL_AD_DECODE_ERROR; + return 0; + } n2s(data,dsize); size -= 2; - if (dsize > size) + if (dsize != size) { *al = SSL_AD_DECODE_ERROR; return 0; |