summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-11-04 12:30:47 +0100
committerRichard Levitte <levitte@openssl.org>2002-11-04 12:30:47 +0100
commite5f4d8279dccad0f6dde324f52333291739dcca3 (patch)
tree1758c4fa98bdc8cd48387245cf39e0a288ff8b02
parentCosmetic change (diff)
downloadopenssl-e5f4d8279dccad0f6dde324f52333291739dcca3.tar.xz
openssl-e5f4d8279dccad0f6dde324f52333291739dcca3.zip
Off-by-one-error corrected.
PR: 235
-rw-r--r--crypto/cryptlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
index e16bbc6626..26c1da7074 100644
--- a/crypto/cryptlib.c
+++ b/crypto/cryptlib.c
@@ -523,7 +523,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));