Check RtlCreateUnicodeString in SetupCreateSingleDirectory.
Patch by Victor Martinez.
CORE-10647 #resolve #comment Thanks a lot!

svn path=/trunk/; revision=70321
This commit is contained in:
Eric Kohl 2015-12-10 15:43:06 +00:00
parent f7500c28d1
commit d8e9559dd9

View file

@ -48,8 +48,9 @@ SetupCreateSingleDirectory(
HANDLE DirectoryHandle;
NTSTATUS Status;
RtlCreateUnicodeString(&PathName,
DirectoryName);
if(!RtlCreateUnicodeString(&PathName, DirectoryName))
return STATUS_NO_MEMORY;
if (PathName.Length > sizeof(WCHAR) &&
PathName.Buffer[PathName.Length / sizeof(WCHAR) - 2] == L'\\' &&
PathName.Buffer[PathName.Length / sizeof(WCHAR) - 1] == L'.')