Fixed the length calculation in RtlCreateProcessParameters().
authorHartmut Birr <osexpert@googlemail.com>
Mon, 1 Apr 2002 22:11:52 +0000 (22:11 +0000)
committerHartmut Birr <osexpert@googlemail.com>
Mon, 1 Apr 2002 22:11:52 +0000 (22:11 +0000)
svn path=/trunk/; revision=2813

reactos/lib/ntdll/rtl/ppb.c

index 758ef92..a1c483e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: ppb.c,v 1.11 2002/03/14 16:32:49 hbirr Exp $
+/* $Id: ppb.c,v 1.12 2002/04/01 22:11:52 hbirr Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -132,8 +132,8 @@ RtlCreateProcessParameters(PRTL_USER_PROCESS_PARAMETERS *ProcessParameters,
 
    /* add string lengths */
    Length += ALIGN(DllPath->MaximumLength, sizeof(ULONG));
-   Length += ALIGN(ImagePathName->Length, sizeof(ULONG));
-   Length += ALIGN(CommandLine->Length, sizeof(ULONG));
+   Length += ALIGN(ImagePathName->Length + sizeof(WCHAR), sizeof(ULONG));
+   Length += ALIGN(CommandLine->Length + sizeof(WCHAR), sizeof(ULONG));
    Length += ALIGN(WindowTitle->MaximumLength, sizeof(ULONG));
    Length += ALIGN(DesktopInfo->MaximumLength, sizeof(ULONG));
    Length += ALIGN(ShellInfo->MaximumLength, sizeof(ULONG));