From a4d2f1025fe54fe040fa9a0bf493fbbe1f00158d Mon Sep 17 00:00:00 2001 From: Chad Loder Date: Wed, 1 Oct 2003 05:52:46 +0000 Subject: Correct some off-by-ones. They currently don't matter, but this is for future safety and consistency. OK krw@, markus@ --- lib/libssl/src/ssl/ssl_ciph.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') 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]; -- cgit v1.2.3