Commit c73bea16 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

ntdll: Don't overwrite last byte of RuntimeInfo if odd number of bytes is used.

parent 322c175c
......@@ -1702,7 +1702,7 @@ static inline void dup_unicode_string( const UNICODE_STRING *src, WCHAR **dst, U
str->Length = src->Length;
str->MaximumLength = src->MaximumLength;
memcpy( *dst, src->Buffer, src->MaximumLength );
*dst += src->MaximumLength / sizeof(WCHAR);
*dst += (src->MaximumLength + 1) / sizeof(WCHAR);
}
......@@ -1798,7 +1798,7 @@ static void *build_wow64_parameters( const RTL_USER_PROCESS_PARAMETERS *params )
+ params->WindowTitle.MaximumLength
+ params->Desktop.MaximumLength
+ params->ShellInfo.MaximumLength
+ params->RuntimeInfo.MaximumLength
+ ((params->RuntimeInfo.MaximumLength + 1) & ~1)
+ params->EnvironmentSize);
status = NtAllocateVirtualMemory( NtCurrentProcess(), (void **)&wow64_params, 0, &size,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment