From: Richard Levitte Date: Mon, 4 Nov 2002 11:30:47 +0000 (+0000) Subject: Off-by-one-error corrected. X-Git-Tag: OpenSSL_0_9_7-beta4~18^2~87 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e5f4d8279dccad0f6dde324f52333291739dcca3;p=thirdparty%2Fopenssl.git Off-by-one-error corrected. PR: 235 --- diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index e16bbc6626c..26c1da7074f 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));