mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 13:16:07 +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();
|
PAGED_CODE();
|
||||||
|
|
||||||
/* ROS HACK */
|
/* ROS HACK */
|
||||||
if (!Process) return;
|
if (!Process)
|
||||||
|
{
|
||||||
|
SubjectContext->PrimaryToken = NULL;
|
||||||
|
SubjectContext->ProcessAuditId = 0;
|
||||||
|
SubjectContext->ClientToken = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Save the unique ID */
|
/* Save the unique ID */
|
||||||
SubjectContext->ProcessAuditId = Process->UniqueProcessId;
|
SubjectContext->ProcessAuditId = Process->UniqueProcessId;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue