Merge branch 'ntdll-curdir' into 'master'

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

See merge request wine/wine!6535
This commit is contained in:
Owen Rudge 2024-11-19 19:31:21 +00:00
commit 7319f62f46

View file

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