]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/PlatformDxe/Platform.c
OvmfPkg/PlatformDxe: Check ExtractConfig and RouteConfig arguments
[mirror_edk2.git] / OvmfPkg / PlatformDxe / Platform.c
index 4bf22712c78f5e6b42b5fb74653e6d98a6639eeb..a6d459f3dfd7a9cbeda0dc3e4d327863c8cd8da0 100644 (file)
@@ -232,6 +232,10 @@ ExtractConfig (
 \r
   DEBUG ((DEBUG_VERBOSE, "%a: Request=\"%s\"\n", __FUNCTION__, Request));\r
 \r
+  if ((Progress == NULL) || (Results == NULL)) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
   Status = PlatformConfigToFormState (&MainFormState);\r
   if (EFI_ERROR (Status)) {\r
     *Progress = Request;\r
@@ -340,6 +344,10 @@ RouteConfig (
     Configuration\r
     ));\r
 \r
+  if (Progress == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
   //\r
   // the "read" step in RMW\r
   //\r