Author: ekohl
Date: Sun Jun 27 20:13:44 2010
New Revision: 47868
URL:
http://svn.reactos.org/svn/reactos?rev=47868&view=rev
Log:
[NTOSKRNL]
NtDuplicateToken: Fail, if TokenType is neither TokenImpersonation nor TokenPrimary.
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=47…
==============================================================================
--- trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] Sun Jun 27 20:13:44 2010
@@ -1811,6 +1811,10 @@
PAGED_CODE();
+ if (TokenType != TokenImpersonation &&
+ TokenType != TokenPrimary)
+ return STATUS_INVALID_PARAMETER;
+
PreviousMode = KeGetPreviousMode();
if (PreviousMode != KernelMode)