Author: tkreuzer
Date: Sat Mar 20 23:05:01 2010
New Revision: 46289
URL:
http://svn.reactos.org/svn/reactos?rev=46289&view=rev
Log:
[NTOS]
NtOpenThreadTokenEx: Initialize NewToken with NULL, so it doesn't get wrongly
dereferenced. Fixes advapi32:security winetest crash.
Modified:
trunk/reactos/ntoskrnl/se/token.c
Modified: trunk/reactos/ntoskrnl/se/token.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/token.c?rev=46…
==============================================================================
--- trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] Sat Mar 20 23:05:01 2010
@@ -2187,7 +2187,7 @@
{
PETHREAD Thread, NewThread;
HANDLE hToken;
- PTOKEN Token, NewToken, PrimaryToken;
+ PTOKEN Token, NewToken = NULL, PrimaryToken;
BOOLEAN CopyOnOpen, EffectiveOnly;
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
SE_IMPERSONATION_STATE ImpersonationState;
@@ -2313,9 +2313,9 @@
}
if (NewToken) ObDereferenceObject(NewToken);
-
+
if (CopyOnOpen && NewThread) ObDereferenceObject(NewThread);
-
+
if(NT_SUCCESS(Status))
{
_SEH2_TRY