]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/PlatformDxe: Check RouteConfig arguments for spec compliance
authorYuan Yu <yuanyu@google.com>
Wed, 24 Aug 2022 02:31:23 +0000 (19:31 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 5 Sep 2022 13:52:51 +0000 (13:52 +0000)
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 <yuanyu@google.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
OvmfPkg/PlatformDxe/Platform.c

index a6d459f3dfd7a9cbeda0dc3e4d327863c8cd8da0..4d432f18df37a3d015a9fc60013fd4822bd73149 100644 (file)
@@ -344,7 +344,7 @@ RouteConfig (
     Configuration\r
     ));\r
 \r
-  if (Progress == NULL) {\r
+  if ((Progress == NULL) || (Configuration == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r