diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index 4580d04c2..bed102a2e 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -460,7 +460,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));