[CMAKE]
[reactos.git] / dll / ntdll / ldr / utils.c
index 30373f3..1cfb8c8 100644 (file)
@@ -256,7 +256,7 @@ LdrpQueryAppPaths(IN PCWSTR ImageName)
     /* Copy it to the heap allocd memory */
     Path = RtlAllocateHeap(RtlGetProcessHeap(),
                            0,
-                           wcslen(SearchPathBuffer) * sizeof(WCHAR));
+                           (wcslen(SearchPathBuffer) + 1) * sizeof(WCHAR));
 
     if (!Path)
     {