]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/VirtioGpuDxe: Fix VS toolchain build failure
authorDandan Bi <dandan.bi@intel.com>
Thu, 22 Sep 2016 01:21:38 +0000 (09:21 +0800)
committerLaszlo Ersek <lersek@redhat.com>
Thu, 22 Sep 2016 02:17:59 +0000 (04:17 +0200)
V2: add the assert codes.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
[lersek@redhat.com: fix up subject line]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
OvmfPkg/VirtioGpuDxe/Commands.c

index b369dc3a7abc06f77798a47ca156c3a1f930ac3f..962087cfec97cdb4a42fdc9b5f0cde954e3c1409 100644 (file)
@@ -284,12 +284,13 @@ VirtioGpuSendCommand (
   Header->Padding   = 0;\r
 \r
   ASSERT (RequestSize >= sizeof *Header);\r
+  ASSERT (RequestSize <= MAX_UINT32);\r
 \r
   //\r
   // Compose the descriptor chain.\r
   //\r
   VirtioPrepare (&VgpuDev->Ring, &Indices);\r
-  VirtioAppendDesc (&VgpuDev->Ring, (UINTN)Header, RequestSize,\r
+  VirtioAppendDesc (&VgpuDev->Ring, (UINTN)Header, (UINT32)RequestSize,\r
     VRING_DESC_F_NEXT, &Indices);\r
   VirtioAppendDesc (&VgpuDev->Ring, (UINTN)&Response, sizeof Response,\r
     VRING_DESC_F_WRITE, &Indices);\r