bcrypt: Fix an possible out-of-bounds read (Coverity).
This commit is contained in:
parent
4afca1787f
commit
fe7e7c62ee
1 changed files with 1 additions and 1 deletions
|
@ -272,7 +272,7 @@ static struct object *get_object( BCRYPT_HANDLE handle, ULONG magic )
|
|||
}
|
||||
|
||||
idx = (ULONG_PTR)handle >> 4;
|
||||
if (idx > ARRAY_SIZE(pseudo_algorithms) || !pseudo_algorithms[idx].hdr.magic)
|
||||
if (idx >= ARRAY_SIZE(pseudo_algorithms) || !pseudo_algorithms[idx].hdr.magic)
|
||||
{
|
||||
FIXME( "pseudo-handle %p not supported\n", handle );
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue