- Fix massive memory corruption during FDO device relations handling

svn path=/trunk/; revision=53272
This commit is contained in:
Cameron Gutman
2011-08-16 20:48:18 +00:00
parent fd460fd4a1
commit 85850fc32b
+2 -2
View File
@@ -193,7 +193,7 @@ Bus_FDO_PnP (
//
length = sizeof(DEVICE_RELATIONS) +
((numPdosPresent + prevcount) * sizeof (PDEVICE_OBJECT)) -1;
(((numPdosPresent + prevcount) - 1) * sizeof (DEVICE_OBJECT));
relations = (PDEVICE_RELATIONS) ExAllocatePoolWithTag (PagedPool,
length, 'IPCA');
@@ -214,7 +214,7 @@ Bus_FDO_PnP (
//
if (prevcount) {
RtlCopyMemory (relations->Objects, oldRelations->Objects,
prevcount * sizeof (PDEVICE_OBJECT));
prevcount * sizeof (DEVICE_OBJECT));
}
relations->Count = prevcount + numPdosPresent;