mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 08:04:07 +02:00
OvmfPkg/VirtioGpuDxe: Check QueryMode arguments
The current implementation does not check if Info or SizeInfo pointers are NULL. This causes the SCT test suite to crash. Add a check to return EFI_INVALID_PARAMETER if any of these pointers are NULL. Signed-off-by: Dimitrije Pavlov <Dimitrije.Pavlov@arm.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com>
This commit is contained in:
parent
30d62f5e31
commit
b94836b224
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user