ShellPkg: acpiview: RSDP: Validate global pointer before use
Check if XsdtAddress pointer has been successfully updated before it is used for further table parsing. Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
This commit is contained in:
committed by
mergify[bot]
parent
5bd326c5f3
commit
f69248d093
@ -138,6 +138,18 @@ ParseAcpiRsdp (
|
||||
PARSER_PARAMS (RsdpParser)
|
||||
);
|
||||
|
||||
// Check if the values used to control the parsing logic have been
|
||||
// successfully read.
|
||||
if (XsdtAddress == NULL) {
|
||||
IncrementErrorCount ();
|
||||
Print (
|
||||
L"ERROR: Insufficient table length. AcpiTableLength = %d." \
|
||||
L"RSDP parsing aborted.\n",
|
||||
AcpiTableLength
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// This code currently supports parsing of XSDT table only
|
||||
// and does not parse the RSDT table. Platforms provide the
|
||||
// RSDT to enable compatibility with ACPI 1.0 operating systems.
|
||||
|
Reference in New Issue
Block a user