[NTOS:SE] Fix always-true assert in SeTokenCanImpersonate.
authorThomas Faber <thomas.faber@reactos.org>
Sun, 21 Nov 2021 14:34:07 +0000 (09:34 -0500)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 21 Nov 2021 17:57:50 +0000 (12:57 -0500)
Courtesy of VS analysis warning C6289:
Incorrect operator:  mutual exclusion over || is always a non-zero constant.  Did you intend to use && instead?

ntoskrnl/se/token.c

index fb1b0a5..cd320a8 100644 (file)
@@ -3585,7 +3585,7 @@ SeTokenCanImpersonate(
      * allow impersonation. If we get such levels from the call
      * then something's seriously wrong.
      */
-    ASSERT(ImpersonationLevel != SecurityAnonymous ||
+    ASSERT(ImpersonationLevel != SecurityAnonymous &&
            ImpersonationLevel != SecurityIdentification);
 
     /* Time to lock our tokens */