summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/VirtioGpuDxe/Gop.c
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/VirtioGpuDxe/Gop.c')
-rw-r--r--OvmfPkg/VirtioGpuDxe/Gop.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/OvmfPkg/VirtioGpuDxe/Gop.c b/OvmfPkg/VirtioGpuDxe/Gop.c
index 401db47672..16e92830d4 100644
--- a/OvmfPkg/VirtioGpuDxe/Gop.c
+++ b/OvmfPkg/VirtioGpuDxe/Gop.c
@@ -308,7 +308,10 @@ GopQueryMode (
{
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *GopModeInfo;
- if (ModeNumber >= This->Mode->MaxMode) {
+ if ((Info == NULL) ||
+ (SizeOfInfo == NULL) ||
+ (ModeNumber >= This->Mode->MaxMode))
+ {
return EFI_INVALID_PARAMETER;
}