diff options
author | Dandan Bi <dandan.bi@intel.com> | 2016-09-22 09:21:38 +0800 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2016-09-22 04:17:59 +0200 |
commit | 7f1bf51bdbcaf9dd46f77cf4bd5e69a294dd995e (patch) | |
tree | 9902b21bc3736a7e4874188ec20af71c645849d2 /OvmfPkg/VirtioGpuDxe | |
parent | 5919a9600e07b4700b54a5b47ae3991aad0e883c (diff) | |
download | edk2-7f1bf51bdbcaf9dd46f77cf4bd5e69a294dd995e.tar.gz edk2-7f1bf51bdbcaf9dd46f77cf4bd5e69a294dd995e.tar.bz2 edk2-7f1bf51bdbcaf9dd46f77cf4bd5e69a294dd995e.zip |
OvmfPkg/VirtioGpuDxe: Fix VS toolchain build failure
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>
Diffstat (limited to 'OvmfPkg/VirtioGpuDxe')
-rw-r--r-- | OvmfPkg/VirtioGpuDxe/Commands.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/OvmfPkg/VirtioGpuDxe/Commands.c b/OvmfPkg/VirtioGpuDxe/Commands.c index b369dc3a7a..962087cfec 100644 --- a/OvmfPkg/VirtioGpuDxe/Commands.c +++ b/OvmfPkg/VirtioGpuDxe/Commands.c @@ -284,12 +284,13 @@ VirtioGpuSendCommand ( Header->Padding = 0;
ASSERT (RequestSize >= sizeof *Header);
+ ASSERT (RequestSize <= MAX_UINT32);
//
// Compose the descriptor chain.
//
VirtioPrepare (&VgpuDev->Ring, &Indices);
- VirtioAppendDesc (&VgpuDev->Ring, (UINTN)Header, RequestSize,
+ VirtioAppendDesc (&VgpuDev->Ring, (UINTN)Header, (UINT32)RequestSize,
VRING_DESC_F_NEXT, &Indices);
VirtioAppendDesc (&VgpuDev->Ring, (UINTN)&Response, sizeof Response,
VRING_DESC_F_WRITE, &Indices);
|