[ADVAPI32_APITEST]
authorThomas Faber <thomas.faber@reactos.org>
Sun, 30 Aug 2015 08:37:13 +0000 (08:37 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 30 Aug 2015 08:37:13 +0000 (08:37 +0000)
- Do not call RtlInitUnicodeString on an unterminated string (DPH)

svn path=/trunk/; revision=68867

rostests/apitests/advapi32/HKEY_CLASSES_ROOT.c

index 636c2cd..c65e76a 100644 (file)
@@ -60,8 +60,9 @@ GetKeyName(HKEY hKey, PUNICODE_STRING KeyName)
     Status = NtQueryKey(hKey, KeyNameInformation, NameInformation, InfoLength, &InfoLength);
     ok_ntstatus(Status, STATUS_SUCCESS);
 
     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.Length = NameInformation->NameLength;
+    InfoName.MaximumLength = InfoName.Length;
 
     RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, &InfoName, KeyName);
 
 
     RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, &InfoName, KeyName);