mirror of https://github.com/acidanthera/audk.git
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:
parent
5bd326c5f3
commit
f69248d093
|
@ -138,6 +138,18 @@ ParseAcpiRsdp (
|
||||||
PARSER_PARAMS (RsdpParser)
|
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
|
// This code currently supports parsing of XSDT table only
|
||||||
// and does not parse the RSDT table. Platforms provide the
|
// and does not parse the RSDT table. Platforms provide the
|
||||||
// RSDT to enable compatibility with ACPI 1.0 operating systems.
|
// RSDT to enable compatibility with ACPI 1.0 operating systems.
|
||||||
|
|
Loading…
Reference in New Issue