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

[win-pv-devel] [PATCH] Increase FrontendPath length for long DeviceIds


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Owen Smith <owen.smith@xxxxxxxxxx>
  • Date: Wed, 15 Jan 2020 11:50:44 +0000
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=owen.smith@xxxxxxxxxx; spf=Pass smtp.mailfrom=owen.smith@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Owen Smith <owen.smith@xxxxxxxxxx>
  • Delivery-date: Wed, 15 Jan 2020 11:51:26 +0000
  • Ironport-sdr: +qbEkc1F9lH0YKs1ZoxGdI+R+F4Uh/f80vGdQsA81JDdOLIFQG2kGhi+kYWK9Rgd3SnUi4Du1y 6IoC4OvdNsJEwXEXkd6NaO88cjUiIL8GPSG3Zbu5K7hbHcVwAAD7tJNxjXqk7JwNcbQACbTS0U 9cyncBxylfrtng2teVI+hVuDyIt65q9vKi1wVBKwke0ZBYEDStUdAZ9TN9hWrTQfgVA7JAHzrw YkK04pxUrhTGCrdqFk6XpKI/YJ1Ace/s34Dil0a70rR/Ec3rTXFazgmE+QLndpKBmCq4e500ZV B7A=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

The DeviceIds maximum value is 1 << 28 | 0xfffff << 8 | 0xff, which is a
9 digit decimal numver. Values higher than this are invalid. Ensure the
FrontendPath buffer is large enough to contain valid DeviceId values.

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

diff --git a/src/xenvbd/frontend.c b/src/xenvbd/frontend.c
index 3fa19a0..d74f0b3 100644
--- a/src/xenvbd/frontend.c
+++ b/src/xenvbd/frontend.c
@@ -62,7 +62,7 @@ struct _XENVBD_FRONTEND {
     PXENVBD_TARGET              Target;
     ULONG                       TargetId;
     ULONG                       DeviceId;
-    CHAR                        FrontendPath[sizeof("device/vbd/XXXXXXXX")];
+    CHAR                        FrontendPath[sizeof("device/vbd/XXXXXXXXX")];
     PCHAR                       BackendPath;
     CHAR                        TargetPath[sizeof("data/scsi/target/XXXX")];
     USHORT                      BackendDomain;
-- 
2.16.2.windows.1


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

 


Rackspace

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