summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/PlatformDxe
diff options
context:
space:
mode:
authorYuan Yu <yuanyu@google.com>2022-08-23 19:31:23 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-09-05 13:52:51 +0000
commit165b5bcd68e2c563f93f8f5121d20efeab939a6a (patch)
treed172d3b915d532abb1cda0197992ab6eabdd388f /OvmfPkg/PlatformDxe
parente61f3f4ef13ab96746518ca238b42bdc9e00affe (diff)
downloadedk2-165b5bcd68e2c563f93f8f5121d20efeab939a6a.tar.gz
edk2-165b5bcd68e2c563f93f8f5121d20efeab939a6a.tar.bz2
edk2-165b5bcd68e2c563f93f8f5121d20efeab939a6a.zip
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 <yuanyu@google.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'OvmfPkg/PlatformDxe')
-rw-r--r--OvmfPkg/PlatformDxe/Platform.c2
1 files changed, 1 insertions, 1 deletions
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;
}