ntdll: Set correct MaximumLength when current directory path is longer than MAX_PATH.

This commit is contained in:
Owen Rudge 2024-09-20 09:49:24 +01:00
parent 7037201214
commit 7d2a210b35

View file

@ -614,7 +614,7 @@ NTSTATUS WINAPI RtlCreateProcessParametersEx( RTL_USER_PROCESS_PARAMETERS **resu
curdir = cur_params->CurrentDirectory.DosPath;
}
else curdir = *CurrentDirectoryName;
curdir.MaximumLength = MAX_PATH * sizeof(WCHAR);
curdir.MaximumLength = max(curdir.Length, MAX_PATH * sizeof(WCHAR));
if (!CommandLine) CommandLine = ImagePathName;
if (!Environment && cur_params) Environment = cur_params->Environment;