Add OpenProcess server patch.

This commit is contained in:
Michael Müller
2014-08-14 03:28:26 +02:00
parent 03b7601b4c
commit d8b9dc9636
4 changed files with 53 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
From dd42b1c92e5e72953da216a12e2d244178633089 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 14 Aug 2014 03:05:52 +0200
Subject: server: Return error when opening a terminating process.
---
server/process.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/server/process.c b/server/process.c
index 7b9a3b2..7935373 100644
--- a/server/process.c
+++ b/server/process.c
@@ -1082,7 +1082,10 @@ DECL_HANDLER(open_process)
reply->handle = 0;
if (process)
{
- reply->handle = alloc_handle( current->process, process, req->access, req->attributes );
+ if (!process->is_terminating)
+ reply->handle = alloc_handle( current->process, process, req->access, req->attributes );
+ else
+ set_error( STATUS_INVALID_PARAMETER );
release_object( process );
}
}
--
1.9.1

View File

@@ -0,0 +1,4 @@
Author: Michael Müller
Subject: Return error when opening a terminating process.
Revision: 1
Fixes: [37087] Gothic 2 demo expects an error when opening a terminating process