mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
Initialized the key name before each call to ZwCreateKey in IopCreateDeviceKeyPath.
svn path=/trunk/; revision=13998
This commit is contained in:
parent
154d6c64f8
commit
0618186aa6
1 changed files with 5 additions and 5 deletions
|
@ -764,16 +764,15 @@ IopCreateDeviceKeyPath(PWSTR Path,
|
|||
}
|
||||
|
||||
wcsncpy (KeyBuffer, Path, MAX_PATH-1);
|
||||
RtlInitUnicodeString (&KeyName, KeyBuffer);
|
||||
|
||||
/* Skip \\Registry\\ */
|
||||
Current = KeyName.Buffer;
|
||||
Current = wcschr (Current, '\\') + 1;
|
||||
Current = wcschr (Current, '\\') + 1;
|
||||
Current = KeyBuffer;
|
||||
Current = wcschr (Current, L'\\') + 1;
|
||||
Current = wcschr (Current, L'\\') + 1;
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
Next = wcschr (Current, '\\');
|
||||
Next = wcschr (Current, L'\\');
|
||||
if (Next == NULL)
|
||||
{
|
||||
/* The end */
|
||||
|
@ -783,6 +782,7 @@ IopCreateDeviceKeyPath(PWSTR Path,
|
|||
*Next = 0;
|
||||
}
|
||||
|
||||
RtlInitUnicodeString (&KeyName, KeyBuffer);
|
||||
InitializeObjectAttributes (&ObjectAttributes,
|
||||
&KeyName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
|
|
Loading…
Reference in a new issue