From 7536c9f6eccc1381535fcad47eddcedf0486659c Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 3 Jan 2010 15:24:16 +0000 Subject: [PATCH] - Copy property data to the user-mode buffer. - Return the enumerator name without trailing backslash. svn path=/trunk/; revision=44913 --- reactos/ntoskrnl/io/pnpmgr/plugplay.c | 2 +- reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/plugplay.c b/reactos/ntoskrnl/io/pnpmgr/plugplay.c index dea295b5890..492d4a14683 100644 --- a/reactos/ntoskrnl/io/pnpmgr/plugplay.c +++ b/reactos/ntoskrnl/io/pnpmgr/plugplay.c @@ -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) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index fd60e951854..890fd60d12a 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -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;