https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d575e828d70de86cb0add…
commit d575e828d70de86cb0adde9c59a40eef987f9c9f
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sat Nov 20 01:48:09 2021 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Mon Nov 22 00:13:33 2021 +0100
[NTDLL_APITEST] Test that NtQueryInformationProcess(ProcessWx86Information) can work without a ReturnLength pointer.
---
modules/rostests/apitests/ntdll/NtQueryInformationProcess.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/modules/rostests/apitests/ntdll/NtQueryInformationProcess.c b/modules/rostests/apitests/ntdll/NtQueryInformationProcess.c
index 1fd990a3ef6..9469d4d492c 100644
--- a/modules/rostests/apitests/ntdll/NtQueryInformationProcess.c
+++ b/modules/rostests/apitests/ntdll/NtQueryInformationProcess.c
@@ -310,6 +310,15 @@ Test_ProcessWx86Information(void)
ok_hex(Status, STATUS_DATATYPE_MISALIGNMENT);
/* Query the VDM power */
+ Status = NtQueryInformationProcess(NtCurrentProcess(),
+ ProcessWx86Information,
+ &VdmPower,
+ sizeof(VdmPower),
+ NULL);
+ ok_hex(Status, STATUS_SUCCESS);
+ ok(VdmPower == 0 || VdmPower == 1, "The VDM power value must be within the boundary between 0 and 1, not anything else! Got %lu\n", VdmPower);
+
+ /* Same but with ReturnLength */
Status = NtQueryInformationProcess(NtCurrentProcess(),
ProcessWx86Information,
&VdmPower,
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d84022d7fd41492136842…
commit d84022d7fd4149213684207a33f524cd2c00d3b8
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Sun Nov 21 09:34:07 2021 -0500
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sun Nov 21 12:57:50 2021 -0500
[NTOS:SE] Fix always-true assert in SeTokenCanImpersonate.
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ntoskrnl/se/token.c b/ntoskrnl/se/token.c
index fb1b0a52159..cd320a8dcdf 100644
--- a/ntoskrnl/se/token.c
+++ b/ntoskrnl/se/token.c
@@ -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 */