diff options
author | Bodo Möller <bodo@openssl.org> | 2003-08-14 10:33:56 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2003-08-14 10:33:56 +0000 |
commit | 563c05e2dc77221c4aad740c3b89fc21c84652be (patch) | |
tree | dc968676522aea378426043fd08c589da7a2d6dc | |
parent | 643ecd2ed6fa6f91d674429fc9fca6e2405946de (diff) | |
download | openssl-563c05e2dc77221c4aad740c3b89fc21c84652be.zip openssl-563c05e2dc77221c4aad740c3b89fc21c84652be.tar.gz openssl-563c05e2dc77221c4aad740c3b89fc21c84652be.tar.bz2 |
fix out-of-bounds check in lock_dbg_cb (was too lose to detect all
invalid cases)
PR: 674
-rw-r--r-- | apps/openssl.c | 2 | ||||
-rw-r--r-- | ssl/ssltest.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/openssl.c b/apps/openssl.c index 45af2ba..e0d89d4 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 a304398..7bb4152 100644 --- a/ssl/ssltest.c +++ b/ssl/ssltest.c @@ -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; |