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. Cc: Ard Biesheuvel <[email protected]> Cc: Jiewen Yao <[email protected]> Cc: Liming Gao <[email protected]> Cc: Sunny Wang <[email protected]> Cc: Jeff Booher-Kaeding <[email protected]> Cc: Samer El-Haj-Mahmoud <[email protected]> Signed-off-by: Dimitrije Pavlov <[email protected]> --- OvmfPkg/VirtioGpuDxe/Gop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/VirtioGpuDxe/Gop.c b/OvmfPkg/VirtioGpuDxe/Gop.c index 401db47672ec..bb68b1cdc2bc 100644 --- a/OvmfPkg/VirtioGpuDxe/Gop.c +++ b/OvmfPkg/VirtioGpuDxe/Gop.c @@ -308,7 +308,9 @@ 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; } -- 2.37.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#92440): https://edk2.groups.io/g/devel/message/92440 Mute This Topic: https://groups.io/mt/93040547/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
