summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/PlatformDxe
diff options
context:
space:
mode:
authorDimitrije Pavlov <dimitrije.pavlov@arm.com>2022-08-16 15:28:35 -0500
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-08-16 20:52:19 +0000
commit30d62f5e3170c01f3331677894f80415eec92f23 (patch)
tree5d91013e7d937a660cbb7c44190f74333eff0658 /OvmfPkg/PlatformDxe
parent2812668bfc121ee792cf3302195176ef4a2ad0bc (diff)
downloadedk2-30d62f5e3170c01f3331677894f80415eec92f23.tar.gz
edk2-30d62f5e3170c01f3331677894f80415eec92f23.tar.bz2
edk2-30d62f5e3170c01f3331677894f80415eec92f23.zip
OvmfPkg/PlatformDxe: Check ExtractConfig and RouteConfig arguments
The current implementation does not check if Progress or Results pointers in ExtractConfig are NULL, or if Progress pointer in RouteConfig is 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>
Diffstat (limited to 'OvmfPkg/PlatformDxe')
-rw-r--r--OvmfPkg/PlatformDxe/Platform.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/OvmfPkg/PlatformDxe/Platform.c b/OvmfPkg/PlatformDxe/Platform.c
index 4bf22712c7..a6d459f3df 100644
--- a/OvmfPkg/PlatformDxe/Platform.c
+++ b/OvmfPkg/PlatformDxe/Platform.c
@@ -232,6 +232,10 @@ ExtractConfig (
DEBUG ((DEBUG_VERBOSE, "%a: Request=\"%s\"\n", __FUNCTION__, Request));
+ if ((Progress == NULL) || (Results == NULL)) {
+ return EFI_INVALID_PARAMETER;
+ }
+
Status = PlatformConfigToFormState (&MainFormState);
if (EFI_ERROR (Status)) {
*Progress = Request;
@@ -340,6 +344,10 @@ RouteConfig (
Configuration
));
+ if (Progress == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
//
// the "read" step in RMW
//