Author: fireball
Date: Sun Nov 18 19:12:45 2007
New Revision: 30551
URL:
http://svn.reactos.org/svn/reactos?rev=30551&view=rev
Log:
- Fix paged pool overwrite in IopUnloadDriver, due to a typo in arithmetic. Thanks to
Andrey Korotaev (unC0Rr) for the testcase.
- Make error debug output DPRINT1 instead of DPRINT.
Modified:
trunk/reactos/ntoskrnl/io/iomgr/driver.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/driver.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/driver.c (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/driver.c Sun Nov 18 19:12:45 2007
@@ -955,7 +955,7 @@
ObjectName.MaximumLength = ObjectName.Length + sizeof(WCHAR);
ObjectName.Buffer = ExAllocatePool(PagedPool, ObjectName.MaximumLength);
wcscpy(ObjectName.Buffer, L"\\Driver\\");
- memcpy(ObjectName.Buffer + 8, Start, (ObjectName.Length - 8) * sizeof(WCHAR));
+ memcpy(ObjectName.Buffer + 8, Start, ObjectName.Length - 8 * sizeof(WCHAR));
ObjectName.Buffer[ObjectName.Length/sizeof(WCHAR)] = 0;
/*
@@ -967,7 +967,7 @@
if (!NT_SUCCESS(Status))
{
- DPRINT("Can't locate driver object for %wZ\n", ObjectName);
+ DPRINT1("Can't locate driver object for %wZ\n", ObjectName);
return Status;
}
@@ -994,7 +994,7 @@
if (!NT_SUCCESS(Status))
{
- DPRINT("RtlQueryRegistryValues() failed (Status %x)\n", Status);
+ DPRINT1("RtlQueryRegistryValues() failed (Status %x)\n", Status);
return Status;
}
@@ -1006,7 +1006,7 @@
if (!NT_SUCCESS(Status))
{
- DPRINT("IopNormalizeImagePath() failed (Status %x)\n", Status);
+ DPRINT1("IopNormalizeImagePath() failed (Status %x)\n", Status);
return Status;
}