Skip to content

Commit

Permalink
Clear the memory buffer before constructing a token of it
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed Nov 23, 2019
1 parent a44f466 commit 122c1a0
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public String getCurrentIdentityUser() {
}

Memory ownerToken = new Memory(ownerTokenSize.getValue());
ownerToken.clear();
WinNT.TOKEN_OWNER tokenOwner = new WinNT.TOKEN_OWNER(ownerToken);

if (!advapi32.GetTokenInformation(
Expand Down

0 comments on commit 122c1a0

Please sign in to comment.