ntdll: Set the file_part for \\?\ long file names too

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ntdll: Set the file_part for \\?\ long file names too

James Hawkins
Hi,

This patch fixes a crash when trying to run the True Image installer.
The installer calls FindFirstFileExW with a \\?\ long file name, which
in turn calls RtlDosPathNameToNtPathName_U with the same file.  The
returned mask is never set, so trying to read from it causes a crash.

Changelog
* Set the file_part for \\?\ long file names too.

--
James Hawkins



path.diff (646 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ntdll: Set the file_part for \\?\ long file names too

Eric Pouech-2
>          if (!ntpath->Buffer) return FALSE;
>          memcpy( ntpath->Buffer, dos_path, ntpath->MaximumLength );
>          ntpath->Buffer[1] = '?';  /* change \\?\ to \??\ */
> +        RtlGetFullPathName_U(dos_path, sizeof(local), local, file_part);
>          return TRUE;
>      }
this is wrong as file_part must point into ntpath->Buffer, not into
local, as your code does...

A+
--
Eric Pouech