From 9cc513a000ae44c2ba95a0d54cae2b414a069d0b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bodo=20M=C3=B6ller?= Date: Thu, 14 Aug 2003 10:33:26 +0000 Subject: [PATCH] fix out-of-bounds check in lock_dbg_cb (was too lose to detect all invalid cases) PR: 674 --- apps/openssl.c | 2 +- ssl/ssltest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openssl.c b/apps/openssl.c index 45af2ba7f9..e0d89d4ab4 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -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; diff --git a/ssl/ssltest.c b/ssl/ssltest.c index 47c383200a..42289c255b 100644 --- a/ssl/ssltest.c +++ b/ssl/ssltest.c @@ -290,7 +290,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; -- 2.25.1