Off-by-one-error corrected.
authorRichard Levitte <levitte@openssl.org>
Mon, 4 Nov 2002 11:30:30 +0000 (11:30 +0000)
committerRichard Levitte <levitte@openssl.org>
Mon, 4 Nov 2002 11:30:30 +0000 (11:30 +0000)
PR: 235

crypto/cryptlib.c

index 4580d04c2cc9aa1d6c61bd03fdff7ea316a1645f..bed102a2ec1a2208f765f6f54ea4ba81eb0ff492 100644 (file)
@@ -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));