mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
Prevent garbage being passed for windows directory.
This commit is contained in:
parent
4c64f9bdf9
commit
51700afd9c
1 changed files with 3 additions and 0 deletions
|
@ -1110,10 +1110,12 @@ static void _allocate_default_keys(void)
|
|||
|
||||
static void get_windows_dir(WCHAR* buffer, unsigned len)
|
||||
{
|
||||
static const WCHAR windows_dir[] = {'c',':','\\','w','i','n','d','o','w','s',0};
|
||||
OBJECT_ATTRIBUTES attr;
|
||||
UNICODE_STRING nameW, keyW;
|
||||
HKEY hkey;
|
||||
|
||||
*buffer = 0;
|
||||
attr.Length = sizeof(attr);
|
||||
attr.RootDirectory = 0;
|
||||
attr.ObjectName = &nameW;
|
||||
|
@ -1139,6 +1141,7 @@ static void get_windows_dir(WCHAR* buffer, unsigned len)
|
|||
}
|
||||
RtlFreeUnicodeString( &nameW );
|
||||
}
|
||||
if (!*buffer) lstrcpynW(buffer, windows_dir, len);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue