[ros-diffs] [hbirr] 13998: Initialized the key name before each call to ZwCreateKey in IopCreateDeviceKeyPath.

hbirr at svn.reactos.com hbirr at svn.reactos.com
Sun Mar 13 10:08:27 CET 2005


Initialized the key name before each call to ZwCreateKey in
IopCreateDeviceKeyPath.
Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c
  _____  

Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c
--- trunk/reactos/ntoskrnl/io/pnpmgr.c	2005-03-13 09:06:14 UTC (rev
13997)
+++ trunk/reactos/ntoskrnl/io/pnpmgr.c	2005-03-13 09:08:26 UTC (rev
13998)
@@ -764,16 +764,15 @@

     }
 
   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 @@
 	  *Next = 0;
 	}
 
+      RtlInitUnicodeString (&KeyName, KeyBuffer);
       InitializeObjectAttributes (&ObjectAttributes,
 				  &KeyName,
 				  OBJ_CASE_INSENSITIVE,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050313/701a703c/attachment.html


More information about the Ros-diffs mailing list