1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-01 07:14:31 +00:00

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

This commit is contained in:
Zhiyi Zhang 2023-12-30 11:52:42 +08:00 committed by Alexandre Julliard
parent 4afca1787f
commit fe7e7c62ee

View File

@ -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;