[PATCH] ntdll: Pad the FILE_*_DIRECTORY_INFORMATION with zero bytes

Alexandre Julliard julliard at winehq.org
Tue May 13 06:30:35 CDT 2014


Martin Storsjo <martin at martin.st> writes:

> Instead of memcpying in whatever uninitialized data there was at
> the end of long_nameW, memset the tail of the struct to zero
> instead.
>
> This fixes running cl.exe from MSVC 2013 with native
> msvcr120/msvcp120, fixing bug 35335.
>
> MSVC 2013 (or msvcr120?) seems to use NtQueryDirectoryFile to
> iterate through the headers in directories in the include path,
> and prior to this change, the file names found during iteration
> could get a suffix consisting of an uninitialized WCHAR.

That doesn't make much sense, given that there may not be space for a
final null, and that your patch doesn't clear the right location
anyway. It looks like more investigation is needed.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list