Off-by-one-error corrected.

PR: 235
This commit is contained in:
Richard Levitte 2002-11-04 11:30:38 +00:00
parent e85cbdad7a
commit 455bacd4d3

View File

@ -461,7 +461,7 @@ const char *CRYPTO_get_lock_name(int type)
return("dynamic"); return("dynamic");
else if (type < CRYPTO_NUM_LOCKS) else if (type < CRYPTO_NUM_LOCKS)
return(lock_names[type]); 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"); return("ERROR");
else else
return(sk_value(app_locks,type-CRYPTO_NUM_LOCKS)); return(sk_value(app_locks,type-CRYPTO_NUM_LOCKS));