Commit b62abc1a authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ntdll: Fix subauthority count check in RtlInitializeSid().

parent af65fa04
......@@ -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;
......
......@@ -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);
......
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