]> xenbits.xensource.com Git - pvdrivers/win/xenvbd.git/commitdiff
Increase FrontendPath length for long DeviceIds
authorOwen Smith <owen.smith@citrix.com>
Wed, 15 Jan 2020 11:50:44 +0000 (11:50 +0000)
committerPaul Durrant <pdurrant@amazon.com>
Wed, 15 Jan 2020 12:18:48 +0000 (13:18 +0100)
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@citrix.com>
src/xenvbd/frontend.c

index 3fa19a0823d89e0c0e61105ac6fe959867616266..d74f0b37eebe175a78d17e4c800f22fa4adca78a 100644 (file)
@@ -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;