From 9a086d14833256b0a76c01c988d2558d0cc63167 Mon Sep 17 00:00:00 2001 From: DavidXanatos <3890945+DavidXanatos@users.noreply.github.com> Date: Mon, 16 Dec 2024 09:51:18 +0100 Subject: [PATCH] Update thread.c #4421 --- Sandboxie/core/drv/thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sandboxie/core/drv/thread.c b/Sandboxie/core/drv/thread.c index 3baebce5..1858a877 100644 --- a/Sandboxie/core/drv/thread.c +++ b/Sandboxie/core/drv/thread.c @@ -1104,9 +1104,9 @@ _FX ACCESS_MASK Thread_CheckObject_CommonEx( // If the calling process is sandboxed the later common check will do the blocking // - if (!proc || proc->bHostInject) { // caller is not sandboxed + if (!proc || (proc == PROCESS_TERMINATED) || proc->bHostInject) { // caller is not sandboxed - if (Process_Find(pid, NULL)) { // target is sandboxed - lock free check + if (pid != NULL && Process_Find(pid, NULL)) { // target is sandboxed - lock free check void* nbuf = 0; ULONG nlen = 0;