Module: wine Branch: master Commit: fe7e7c62ee938407e0e411f5fd64637b40bfc2d2 URL: https://gitlab.winehq.org/wine/wine/-/commit/fe7e7c62ee938407e0e411f5fd64637...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Sat Dec 30 11:52:42 2023 +0800
bcrypt: Fix an possible out-of-bounds read (Coverity).
---
dlls/bcrypt/bcrypt_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c index 26472cbfe2b..52066a32c74 100644 --- a/dlls/bcrypt/bcrypt_main.c +++ b/dlls/bcrypt/bcrypt_main.c @@ -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;