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

crypto/cryptlib.c

index bd49ad06935be250841c23358a279b60748f9abf..0849245924842b7d3aeb48db2cb820e85fb3f61b 100644 (file)
@@ -461,7 +461,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));