[USETUP]
authorEric Kohl <eric.kohl@reactos.org>
Thu, 10 Dec 2015 15:43:06 +0000 (15:43 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Thu, 10 Dec 2015 15:43:06 +0000 (15:43 +0000)
Check RtlCreateUnicodeString in SetupCreateSingleDirectory.
Patch by Victor Martinez.
CORE-10647 #resolve #comment Thanks a lot!

svn path=/trunk/; revision=70321

reactos/base/setup/usetup/filesup.c

index 2815ac8..496149b 100644 (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'.')