summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon L. B. Nielsen <simon@FreeBSD.org>2011-02-13 11:09:39 +0000
committerSimon L. B. Nielsen <simon@FreeBSD.org>2011-02-13 11:09:39 +0000
commit164d29bd31f04c5e64e10e80c61d84d9c1ad7600 (patch)
tree9279b6a3d38579b4aae5e0cf332e035b5e33c399
parent3c11356fa4b887b4790da4c31e5967209b21c3be (diff)
Notes
-rw-r--r--crypto/openssl/ssl/t1_lib.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/crypto/openssl/ssl/t1_lib.c b/crypto/openssl/ssl/t1_lib.c
index 0cc8320e1789f..92cac130024af 100644
--- a/crypto/openssl/ssl/t1_lib.c
+++ b/crypto/openssl/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;