- If SeCaptureSubjectContextEx is called without a process, at least NULL-initialize the context to catch dereferences of invalid pointers.

svn path=/trunk/; revision=23698
This commit is contained in:
Alex Ionescu 2006-08-25 01:04:44 +00:00
parent 7d305ec8e6
commit 35778c9f25

View file

@ -426,7 +426,13 @@ SeCaptureSubjectContextEx(IN PETHREAD Thread,
PAGED_CODE();
/* ROS HACK */
if (!Process) return;
if (!Process)
{
SubjectContext->PrimaryToken = NULL;
SubjectContext->ProcessAuditId = 0;
SubjectContext->ClientToken = NULL;
return;
}
/* Save the unique ID */
SubjectContext->ProcessAuditId = Process->UniqueProcessId;