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;