From 165b5bcd68e2c563f93f8f5121d20efeab939a6a Mon Sep 17 00:00:00 2001 From: Yuan Yu Date: Tue, 23 Aug 2022 19:31:23 -0700 Subject: OvmfPkg/PlatformDxe: Check RouteConfig arguments for spec compliance Per UEFI Spec 2.9, EFI_HII_CONFIG_ROUTING_PROTOCOL.RouteConfig() should return EFI_INVALID_PARAMETER if caller passes in a NULL for the Configuration parameter (see 35.4 EFI HII Configuration Routing Protocol). Add a check to return EFI_INVALID_PARAMETER when Configuration is NULL. Signed-off-by: Yuan Yu Reviewed-by: Ard Biesheuvel --- OvmfPkg/PlatformDxe/Platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OvmfPkg/PlatformDxe/Platform.c b/OvmfPkg/PlatformDxe/Platform.c index a6d459f3df..4d432f18df 100644 --- a/OvmfPkg/PlatformDxe/Platform.c +++ b/OvmfPkg/PlatformDxe/Platform.c @@ -344,7 +344,7 @@ RouteConfig ( Configuration )); - if (Progress == NULL) { + if ((Progress == NULL) || (Configuration == NULL)) { return EFI_INVALID_PARAMETER; } -- cgit v1.2.3