summaryrefslogtreecommitdiff
path: root/lib/libssl/ssl_ciph.c
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
commit82c4b7a697ea14847c6e75f17cdfae3473d1cc1d (patch)
treed2c4bcf883e4f27aae66cfb999d3ffdba5355658 /lib/libssl/ssl_ciph.c
parent4f1427f62d41bca2a76f8d2a836c75b26af78370 (diff)
Correct some off-by-ones. They currently don't matter, but this
is for future safety and consistency. OK krw@, markus@
Diffstat (limited to 'lib/libssl/ssl_ciph.c')
-rw-r--r--lib/libssl/ssl_ciph.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libssl/ssl_ciph.c b/lib/libssl/ssl_ciph.c
index 438d9eacbbc..532fb4e80d6 100644
--- a/lib/libssl/ssl_ciph.c
+++ b/lib/libssl/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];