Commit fe7e7c62 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

bcrypt: Fix an possible out-of-bounds read (Coverity).

parent 4afca178
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment