diff --git a/reactos/ntoskrnl/ex/harderr.c b/reactos/ntoskrnl/ex/harderr.c index 9b2dc25eb89..bf37ba0aa08 100644 --- a/reactos/ntoskrnl/ex/harderr.c +++ b/reactos/ntoskrnl/ex/harderr.c @@ -136,6 +136,7 @@ ExpRaiseHardError(IN NTSTATUS ErrorStatus, if (!SeSinglePrivilegeCheck(SeShutdownPrivilege, PreviousMode)) { /* No rights */ + *Response = ResponseNotHandled; return STATUS_PRIVILEGE_NOT_HELD; } @@ -248,6 +249,11 @@ ExpRaiseHardError(IN NTSTATUS ErrorStatus, /* Set the response */ *Response = Message->Response; } + else + { + /* Set the response */ + *Response = ResponseReturnToCaller; + } } else { diff --git a/reactos/subsystems/win32/csrss/win32csr/harderror.c b/reactos/subsystems/win32/csrss/win32csr/harderror.c index b0279c4340e..128b16bc433 100644 --- a/reactos/subsystems/win32/csrss/win32csr/harderror.c +++ b/reactos/subsystems/win32/csrss/win32csr/harderror.c @@ -323,7 +323,7 @@ CsrpFormatMessages( RtlAppendUnicodeStringToString(CaptionStringU, &TempStringU); /* Zero terminate the buffer */ - CaptionStringU->Buffer[CaptionStringU->Length] = 0; + CaptionStringU->Buffer[CaptionStringU->Length / sizeof(WCHAR)] = 0; /* Free the file name buffer */ RtlFreeUnicodeString(&FileNameU);