summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2003-10-01 05:52:46 +0000
committerChad Loder <cloder@cvs.openbsd.org>2003-10-01 05:52:46 +0000
commita4d2f1025fe54fe040fa9a0bf493fbbe1f00158d (patch)
tree5ed627bcd1b281c933315b4eead0eae65264af21
parentcd41006fd50978e67255469957b7d46f0de70909 (diff)
Correct some off-by-ones. They currently don't matter, but this
is for future safety and consistency. OK krw@, markus@
-rw-r--r--lib/libssl/src/ssl/ssl_ciph.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libssl/src/ssl/ssl_ciph.c b/lib/libssl/src/ssl/ssl_ciph.c
index 438d9eacbbc..532fb4e80d6 100644
--- a/lib/libssl/src/ssl/ssl_ciph.c
+++ b/lib/libssl/src/ssl/ssl_ciph.c
@@ -73,7 +73,7 @@
#define SSL_ENC_NUM_IDX 9
static const EVP_CIPHER *ssl_cipher_methods[SSL_ENC_NUM_IDX]={
- NULL,NULL,NULL,NULL,NULL,NULL,
+ NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
};
static STACK_OF(SSL_COMP) *ssl_comp_methods=NULL;
@@ -251,7 +251,7 @@ int ssl_cipher_get_evp(SSL_SESSION *s, const EVP_CIPHER **enc,
break;
}
- if ((i < 0) || (i > SSL_ENC_NUM_IDX))
+ if ((i < 0) || (i >= SSL_ENC_NUM_IDX))
*enc=NULL;
else
{
@@ -273,7 +273,7 @@ int ssl_cipher_get_evp(SSL_SESSION *s, const EVP_CIPHER **enc,
i= -1;
break;
}
- if ((i < 0) || (i > SSL_MD_NUM_IDX))
+ if ((i < 0) || (i >= SSL_MD_NUM_IDX))
*md=NULL;
else
*md=ssl_digest_methods[i];