[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:
Rafal Harabien 2012-03-14 23:08:48 +00:00
parent f5d2c36849
commit 88091ae0cd
2 changed files with 7 additions and 1 deletions

View file

@ -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
{

View file

@ -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);