diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index bd49ad069..084924592 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -461,7 +461,7 @@ const char *CRYPTO_get_lock_name(int type) return("dynamic"); else if (type < CRYPTO_NUM_LOCKS) return(lock_names[type]); - else if (type-CRYPTO_NUM_LOCKS >= sk_num(app_locks)) + else if (type-CRYPTO_NUM_LOCKS > sk_num(app_locks)) return("ERROR"); else return(sk_value(app_locks,type-CRYPTO_NUM_LOCKS));