mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 13:38:19 +00:00
[NTOSKRNL]
- Always set response in ExpRaiseHardError. Fixes ntoskrnl:ExHardError kmtest [WIN32CSR] - Don't corrupt memory. Fixes random crashes when running ntoskrnl:ExHardError kmtest svn path=/trunk/; revision=56153
This commit is contained in:
parent
f5d2c36849
commit
88091ae0cd
2 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue