mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 04:14:53 +00:00
[KERNEL32]
Fix some broken logic: we can duplicate console handles only if both the source and the target processes are in fact the current process. svn path=/trunk/; revision=59486
This commit is contained in:
parent
542bb5560c
commit
9ff782961b
1 changed files with 5 additions and 1 deletions
|
@ -170,7 +170,11 @@ DuplicateHandle(IN HANDLE hSourceProcessHandle,
|
||||||
((hSourceHandle != NtCurrentProcess()) &&
|
((hSourceHandle != NtCurrentProcess()) &&
|
||||||
(hSourceHandle != NtCurrentThread())))
|
(hSourceHandle != NtCurrentThread())))
|
||||||
{
|
{
|
||||||
if ((hSourceProcessHandle != NtCurrentProcess()) &&
|
/*
|
||||||
|
* We can duplicate console handles only if both the source
|
||||||
|
* and the target processes are in fact the current process.
|
||||||
|
*/
|
||||||
|
if ((hSourceProcessHandle != NtCurrentProcess()) ||
|
||||||
(hTargetProcessHandle != NtCurrentProcess()))
|
(hTargetProcessHandle != NtCurrentProcess()))
|
||||||
{
|
{
|
||||||
BaseSetLastNTError(STATUS_INVALID_PARAMETER);
|
BaseSetLastNTError(STATUS_INVALID_PARAMETER);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue