- Copy property data to the user-mode buffer.
authorEric Kohl <eric.kohl@reactos.org>
Sun, 3 Jan 2010 15:24:16 +0000 (15:24 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Sun, 3 Jan 2010 15:24:16 +0000 (15:24 +0000)
- Return the enumerator name without trailing backslash.

svn path=/trunk/; revision=44913

reactos/ntoskrnl/io/pnpmgr/plugplay.c
reactos/ntoskrnl/io/pnpmgr/pnpmgr.c

index dea295b..492d4a1 100644 (file)
@@ -268,7 +268,7 @@ IopGetDeviceProperty(PPLUGPLAY_CONTROL_PROPERTY_DATA PropertyData)
     {
         _SEH2_TRY
         {
-            memcpy(Buffer, PropertyData->Buffer, BufferSize);
+            memcpy(PropertyData->Buffer, Buffer, BufferSize);
             PropertyData->BufferSize = BufferSize;
         }
         _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
index fd60e95..890fd60 100644 (file)
@@ -3236,7 +3236,7 @@ IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject,
         * always contains the enumerator name followed by \\ */
         Ptr = wcschr(DeviceNode->InstancePath.Buffer, L'\\');
         ASSERT(Ptr);
-        Length = (Ptr - DeviceNode->InstancePath.Buffer + 1) * sizeof(WCHAR);
+        Length = (Ptr - DeviceNode->InstancePath.Buffer) * sizeof(WCHAR);
         Data = DeviceNode->InstancePath.Buffer;
         break;