Commit 51700afd authored by Kevin Koltzau's avatar Kevin Koltzau Committed by Alexandre Julliard

Prevent garbage being passed for windows directory.

parent 4c64f9bd
......@@ -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);
}
......
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