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.

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/PlatformDxe/Platform.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/OvmfPkg/PlatformDxe/Platform.c b/OvmfPkg/PlatformDxe/Platform.c
index 4bf22712c78f..d7be2ab65efa 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
   //
-- 
2.37.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92442): https://edk2.groups.io/g/devel/message/92442
Mute This Topic: https://groups.io/mt/93040549/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to