[NTDLL:LDR]
authorThomas Faber <thomas.faber@reactos.org>
Sun, 22 Jun 2014 18:40:21 +0000 (18:40 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 22 Jun 2014 18:40:21 +0000 (18:40 +0000)
- Fix buffer size calculation in LdrpSearchPath

svn path=/trunk/; revision=63629

reactos/dll/ntdll/ldr/ldrutils.c

index 3cc7608..2efeafd 100644 (file)
@@ -1820,7 +1820,7 @@ LdrpSearchPath(IN PWCHAR *SearchPath,
     /* FIXME: Handle relative case semicolon-lookup here */
 
     /* Calculate length */
-    Length += (ULONG)wcslen(DllName) + sizeof(UNICODE_NULL);
+    Length += (ULONG)wcslen(DllName) + 1;
     if (Length > UNICODE_STRING_MAX_CHARS)
     {
         /* Too long, fail */