summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--OvmfPkg/VirtioGpuDxe/Commands.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/OvmfPkg/VirtioGpuDxe/Commands.c b/OvmfPkg/VirtioGpuDxe/Commands.c
index b369dc3a7..962087cfe 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);