From 0acf86ba046efd4bc37ed9931cc2c0f4bc74f9dd Mon Sep 17 00:00:00 2001 From: jp9000 Date: Mon, 29 May 2017 14:50:50 -0700 Subject: [PATCH] win-capture: Limit OpenProcess flags to prevent A/C issues Limits OpenProcess flags to only the flags that are necessary to prevent any further issues with anti-cheat hooks in the future. --- plugins/win-capture/game-capture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/win-capture/game-capture.c b/plugins/win-capture/game-capture.c index 8c202f31c..535bc1c99 100644 --- a/plugins/win-capture/game-capture.c +++ b/plugins/win-capture/game-capture.c @@ -622,7 +622,7 @@ static inline bool is_64bit_process(HANDLE process) static inline bool open_target_process(struct game_capture *gc) { gc->target_process = open_process( - PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, + PROCESS_QUERY_LIMITED_INFORMATION, false, gc->process_id); if (!gc->target_process) { warn("could not open process: %s", gc->config.executable); @@ -1013,7 +1013,7 @@ static void setup_window(struct game_capture *gc, HWND window) GetWindowThreadProcessId(window, &gc->process_id); if (gc->process_id) { - process = open_process(PROCESS_QUERY_INFORMATION, + process = open_process(PROCESS_QUERY_LIMITED_INFORMATION, false, gc->process_id); if (process) { gc->is_app = is_app(process);