[ADVAPI32_APITEST]

- Do not call RtlInitUnicodeString on an unterminated string (DPH)

svn path=/trunk/; revision=68867
This commit is contained in:
Thomas Faber 2015-08-30 08:37:13 +00:00
parent 285991f04c
commit a54882acc1

View file

@ -60,8 +60,9 @@ GetKeyName(HKEY hKey, PUNICODE_STRING KeyName)
Status = NtQueryKey(hKey, KeyNameInformation, NameInformation, InfoLength, &InfoLength);
ok_ntstatus(Status, STATUS_SUCCESS);
RtlInitUnicodeString(&InfoName, NameInformation->Name);
InfoName.Buffer = NameInformation->Name;
InfoName.Length = NameInformation->NameLength;
InfoName.MaximumLength = InfoName.Length;
RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, &InfoName, KeyName);