Module: wine Branch: master Commit: b62abc1a2cac779db3105997502013c57904ee96 URL: https://gitlab.winehq.org/wine/wine/-/commit/b62abc1a2cac779db3105997502013c...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Tue May 2 22:29:20 2023 +0200
ntdll: Fix subauthority count check in RtlInitializeSid().
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
---
dlls/ntdll/sec.c | 2 +- dlls/ntdll/tests/rtl.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c index 98afc4edd3d..8cadf7b5d60 100644 --- a/dlls/ntdll/sec.c +++ b/dlls/ntdll/sec.c @@ -303,7 +303,7 @@ NTSTATUS WINAPI RtlInitializeSid( int i; SID* pisid=pSid;
- if (nSubAuthorityCount >= SID_MAX_SUB_AUTHORITIES) + if (nSubAuthorityCount > SID_MAX_SUB_AUTHORITIES) return STATUS_INVALID_PARAMETER;
pisid->Revision = SID_REVISION; diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c index c075cae4ba2..269d26c8a16 100644 --- a/dlls/ntdll/tests/rtl.c +++ b/dlls/ntdll/tests/rtl.c @@ -3619,7 +3619,6 @@ static void test_RtlInitializeSid(void) ok(!status, "Unexpected status %#lx.\n", status);
status = RtlInitializeSid(sid, &sid_ident, SID_MAX_SUB_AUTHORITIES); - todo_wine ok(!status, "Unexpected status %#lx.\n", status);
status = RtlInitializeSid(sid, &sid_ident, SID_MAX_SUB_AUTHORITIES + 1);