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>
This commit is contained in:
Dimitrije Pavlov 2022-08-16 15:28:35 -05:00 committed by mergify[bot]
parent 2812668bfc
commit 30d62f5e31
1 changed files with 8 additions and 0 deletions

View File

@ -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
//