- Fix massive memory corruption during FDO device relations handling
svn path=/trunk/; revision=53272
//
length = sizeof(DEVICE_RELATIONS) +
- ((numPdosPresent + prevcount) * sizeof (PDEVICE_OBJECT)) -1;
+ (((numPdosPresent + prevcount) - 1) * sizeof (DEVICE_OBJECT));
relations = (PDEVICE_RELATIONS) ExAllocatePoolWithTag (PagedPool,
length, 'IPCA');
//
if (prevcount) {
RtlCopyMemory (relations->Objects, oldRelations->Objects,
- prevcount * sizeof (PDEVICE_OBJECT));
+ prevcount * sizeof (DEVICE_OBJECT));
}
relations->Count = prevcount + numPdosPresent;