[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] [PATCH 1/3] Calculate size of DEVICE_RELATIONS



Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 src/xendisk/fdo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xendisk/fdo.c b/src/xendisk/fdo.c
index 0045262..8d78a25 100644
--- a/src/xendisk/fdo.c
+++ b/src/xendisk/fdo.c
@@ -886,6 +886,6 @@ FdoQueryDeviceRelations(
         Count++;
 
-    Size = FIELD_OFFSET(DEVICE_RELATIONS, Objects) + (sizeof (DEVICE_OBJECT) * 
__min(Count, 1));
+    Size = sizeof(DEVICE_RELATIONS) + (sizeof (PDEVICE_OBJECT) * Count);
 
     Relations = ExAllocatePoolWithTag(PagedPool, Size, 'TLIF');
 
-- 
1.9.4.msysgit.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.