Commit edf9eb6e authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Fix incorrect GetLongPathName usage exposed by Eric's filename

patches.
parent f5fc26fe
......@@ -1140,10 +1140,11 @@ static RTL_USER_PROCESS_PARAMETERS *create_user_params( LPCWSTR filename, LPCWST
NTSTATUS status;
WCHAR buffer[MAX_PATH];
if (GetLongPathNameW( filename, buffer, MAX_PATH ))
RtlInitUnicodeString( &image_str, buffer );
else
RtlInitUnicodeString( &image_str, filename );
if(!GetLongPathNameW( filename, buffer, MAX_PATH ))
lstrcpynW( buffer, filename, MAX_PATH );
if(!GetFullPathNameW( buffer, MAX_PATH, buffer, NULL ))
lstrcpynW( buffer, filename, MAX_PATH );
RtlInitUnicodeString( &image_str, buffer );
RtlInitUnicodeString( &cmdline_str, cmdline );
if (startup->lpDesktop) RtlInitUnicodeString( &desktop, startup->lpDesktop );
......
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