[NTOSKRNL]

- Append the DLL name and NULL terminate the string more nicely

svn path=/trunk/; revision=48580
This commit is contained in:
Cameron Gutman 2010-08-21 21:25:07 +00:00
parent 80cc3a0e88
commit 68eef5481f

View file

@ -1135,9 +1135,9 @@ CheckDllState:
ImageFileDirectory->Length);
/* Now add the import name and null-terminate it */
RtlAppendStringToString((PSTRING)&DllName,
(PSTRING)&NameString);
DllName.Buffer[(DllName.MaximumLength - 1) / sizeof(WCHAR)] = UNICODE_NULL;
RtlAppendUnicodeStringToString(&DllName,
&NameString);
DllName.Buffer[DllName.Length / sizeof(WCHAR)] = UNICODE_NULL;
/* Load the image */
Status = MmLoadSystemImage(&DllName,