Commit 563c05e2 authored by Bodo Möller's avatar Bodo Möller
Browse files

fix out-of-bounds check in lock_dbg_cb (was too lose to detect all

invalid cases)

PR: 674
parent 643ecd2e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@ static void lock_dbg_cb(int mode, int type, const char *file, int line)
		goto err;
		}

	if (type < 0 || type > CRYPTO_NUM_LOCKS)
	if (type < 0 || type >= CRYPTO_NUM_LOCKS)
		{
		errstr = "type out of bounds";
		goto err;
+1 −1
Original line number Diff line number Diff line
@@ -303,7 +303,7 @@ static void lock_dbg_cb(int mode, int type, const char *file, int line)
		goto err;
		}

	if (type < 0 || type > CRYPTO_NUM_LOCKS)
	if (type < 0 || type >= CRYPTO_NUM_LOCKS)
		{
		errstr = "type out of bounds";
		goto err;