diff options
author | bodo <bodo> | 2011-02-08 17:10:45 +0000 |
---|---|---|
committer | bodo <bodo> | 2011-02-08 17:10:45 +0000 |
commit | 8137b61957f16fb2e1a02ad5fce042ee7a22fd8e (patch) | |
tree | a558b6d3d793926093ae13794a8fd4a67286a8dd /ssl | |
parent | 5542a6c402cb5f968bc298d6de4cfee5e4a0dadd (diff) | |
download | openssl-8137b61957f16fb2e1a02ad5fce042ee7a22fd8e.tar.gz |
OCSP stapling fix (OpenSSL 0.9.8r/1.0.0d)OpenSSL_0_9_8r
Submitted by: Neel Mehta, Adam Langley, Bodo Moeller
Diffstat (limited to 'ssl')
-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 0cc8320e1..92cac1300 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -521,6 +521,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; @@ -559,9 +560,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; |