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

crypto/cryptlib.c

index e16bbc6..26c1da7 100644 (file)
@@ -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));