]> granicus.if.org Git - openssl/commitdiff
Revert "Fix off-by-one errors in ssl_cipher_get_evp()"
authorMatt Caswell <matt@openssl.org>
Sun, 22 Jun 2014 22:17:40 +0000 (23:17 +0100)
committerMatt Caswell <matt@openssl.org>
Sun, 22 Jun 2014 22:17:40 +0000 (23:17 +0100)
This reverts commit 3d86077427f93dc46b18fee706b567ec32ac232a.

Incorrect attribution.

ssl/ssl_ciph.c

index 05b1e5e0dbb00b16c619e59f76031d2d7a7e7df5..13127d725e4f6e8bf9ae723ce64e0d80f3f592fa 100644 (file)
@@ -563,7 +563,7 @@ int ssl_cipher_get_evp(const 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
                {
@@ -597,7 +597,7 @@ int ssl_cipher_get_evp(const 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; 
                if (mac_pkey_type!=NULL) *mac_pkey_type = NID_undef;