mirror of
https://github.com/reactos/reactos.git
synced 2026-11-22 23:45:58 +08:00
[WINSRV] Don't assume a CSR thread in UserServerHardError (#9647)
CSRSRV handles hard-error messages coming from threads that are not CSR client threads (for example a kernel-mode system worker threads) by calling the server DLLs `HardErrorCallback()` with a NULL `CSR_THREAD` pointer (e.g. `CsrApiRequestThread()` in `subsystems/csr/csrsrv/api.c`). `UserServerHardError()` unconditionally dereferenced that pointer in an `ASSERT` and thus, on debug builds, any hard-error raised from such a thread was making csrss.exe fault and bugcheck the system because a critical process (csrss.exe) had died. Note that `ThreadData` is not used anywhere else in the function.
This commit is contained in:
@@ -1091,7 +1091,7 @@ UserServerHardError(
|
||||
WCHAR LocalCaptionBuffer[256];
|
||||
NTSTATUS Status;
|
||||
|
||||
ASSERT(ThreadData->Process != NULL);
|
||||
ASSERT(!ThreadData || ThreadData->Process != NULL);
|
||||
|
||||
/* Default to not handled */
|
||||
Message->Response = ResponseNotHandled;
|
||||
|
||||
Reference in New Issue
Block a user