Skip to content

Commit f1c1e73

Browse files
committed
DS2: adjust type for GetSidSubAuthorityCount result
`GetSidSubAuthorityCount` returns a `PUCHAR`, adjust the storage to use the appropriate type rather than the `DWORD` which widens the result unnecessarily (and subsequently needs to be truncated for the calls in the construction of the SID.
1 parent 0b71a96 commit f1c1e73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Headers/DebugServer2/Types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ inline BOOL AllocateAndCopySid(const PSID pSid, PSID *ppSid) noexcept {
239239
if (!IsValidSid(pSid))
240240
return CreateWellKnownSid(WinNullSid, nullptr, ppSid, nullptr);
241241

242-
DWORD nSubAuthorityCount = *GetSidSubAuthorityCount(pSid);
242+
UCHAR nSubAuthorityCount = *GetSidSubAuthorityCount(pSid);
243243
return AllocateAndInitializeSid(GetSidIdentifierAuthority(pSid),
244244
nSubAuthorityCount,
245245
nSubAuthorityCount > 0 ? *GetSidSubAuthority(pSid, 0) : 0,

0 commit comments

Comments
 (0)