[NTOS]: No good deed goes unpunished. Continuing the novel/saga from a couple of days ago, it seems that now that impersonation works, various code paths are being tickled into existence. For example, it would seem parts of the system now attempt setting primary tokens. This would cause an assertion, since PspAssignPrimaryToken incorrectly dereferenced the token (leading to a double-dereference) due to an off-by-! mistake.

svn path=/trunk/; revision=46049
This commit is contained in:
Sir Richard 2010-03-10 04:12:25 +00:00
parent 90fa1d0343
commit fc4574d166

View file

@ -206,7 +206,7 @@ PspAssignPrimaryToken(IN PEPROCESS Process,
/* Dereference Tokens and Return */
if (NT_SUCCESS(Status)) ObDereferenceObject(OldToken);
if (AccessToken) ObDereferenceObject(NewToken);
if (!AccessToken) ObDereferenceObject(NewToken);
return Status;
}