fix out-of-bounds check in lock_dbg_cb (was too lose to detect all
invalid cases) PR: 674
This commit is contained in:
@@ -163,7 +163,7 @@ static void lock_dbg_cb(int mode, int type, const char *file, int line)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type < 0 || type > CRYPTO_NUM_LOCKS)
|
if (type < 0 || type >= CRYPTO_NUM_LOCKS)
|
||||||
{
|
{
|
||||||
errstr = "type out of bounds";
|
errstr = "type out of bounds";
|
||||||
goto err;
|
goto err;
|
||||||
|
@@ -290,7 +290,7 @@ static void lock_dbg_cb(int mode, int type, const char *file, int line)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type < 0 || type > CRYPTO_NUM_LOCKS)
|
if (type < 0 || type >= CRYPTO_NUM_LOCKS)
|
||||||
{
|
{
|
||||||
errstr = "type out of bounds";
|
errstr = "type out of bounds";
|
||||||
goto err;
|
goto err;
|
||||||
|
Reference in New Issue
Block a user