summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-05-26 00:05:28 +0100
committerMatt Caswell <matt@openssl.org>2015-05-26 10:35:29 +0100
commit9c89d290834f3ed9146eeb8b64fe5de817679a0b (patch)
treebaabb3821bc491207f7fd6eebca3758f89e40576
parent90e7cdff3aa66779486914f88333f6601f0c1cf4 (diff)
Don't check for a negative SRP extension size
The size of the SRP extension can never be negative (the variable |size| is unsigned). Therefore don't check if it is less than zero. RT#3862 Reviewed-by: Richard Levitte <levitte@openssl.org>
-rw-r--r--ssl/t1_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index ce010ca4ed..a161dcc5f4 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -2047,7 +2047,7 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p,
}
#ifndef OPENSSL_NO_SRP
else if (type == TLSEXT_TYPE_srp) {
- if (size <= 0 || ((len = data[0])) != (size - 1)) {
+ if (size == 0 || ((len = data[0])) != (size - 1)) {
*al = SSL_AD_DECODE_ERROR;
return 0;
}