From d8400bcd32469c8446ce21a4e358d4d7a10cc6a2 Mon Sep 17 00:00:00 2001 From: DavidXanatos Date: Sun, 6 Nov 2022 10:16:32 +0100 Subject: [PATCH] 1.5.3 BSOD fix --- CHANGELOG.md | 2 +- Sandboxie/core/drv/ipc.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 719ce686..d0850714 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - fixed compatibility issue with Microsoft Edge [#2312](https://github.com/sandboxie-plus/Sandboxie/issues/2312) - fixed UsePrivacyMode=y compatibility with Windows 7 [#2423](https://github.com/sandboxie-plus/Sandboxie/issues/2423) - fixed minor issue during Sandboxie Plus uninstall [#2421](https://github.com/sandboxie-plus/Sandboxie/issues/2421) - +- fixed BSOD issue when driver initialization fails (introduced in 1.5.1) [#2431](https://github.com/sandboxie-plus/Sandboxie/issues/2431) diff --git a/Sandboxie/core/drv/ipc.c b/Sandboxie/core/drv/ipc.c index 7e340f23..816ba709 100644 --- a/Sandboxie/core/drv/ipc.c +++ b/Sandboxie/core/drv/ipc.c @@ -132,9 +132,9 @@ _FX BOOLEAN Ipc_Init(void) }; const UCHAR **NamePtr; + List_Init(&Ipc_ObjDirs); if (! Mem_GetLockResource(&Ipc_DirLock, TRUE)) return FALSE; - List_Init(&Ipc_ObjDirs); // // set object open handlers for generic objects @@ -1828,6 +1828,9 @@ _FX void Ipc_Unload(void) if (Ipc_Dynamic_Ports.pPortLock) Mem_FreeLockResource(&Ipc_Dynamic_Ports.pPortLock); + if (Ipc_DirLock == NULL) + return; // Early driver initialization failed + KIRQL irql; KeRaiseIrql(APC_LEVEL, &irql); ExAcquireResourceExclusiveLite(Ipc_DirLock, TRUE);