mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
- 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:
parent
7d305ec8e6
commit
35778c9f25
1 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue