audk/ShellPkg/Library/UefiShellAcpiViewCommandLib
Krzysztof Koch 5bd326c5f3 ShellPkg: acpiview: Set ItemPtr to NULL for unprocessed table fields
For fields outside the buffer length provided, reset any pointers,
which were supposed to be updated by a ParseAcpi() function call to
NULL. This way one can easily validate if a pointer was successfully
updated.

The ParseAcpi() function parses the given ACPI table buffer by a
number of bytes which is a minimum of the buffer length and the length
described by ACPI_PARSER array. If the buffer length is shorter than
the array describing how to process the ACPI structure, then it is
possible that the ItemPtr inside ACPI_PARSER may not get updated or
initialized. This can lead to an error if the value pointed to by
ItemPtr is later used to control the parsing logic.

A typical example would be a 'number of elements' field in an ACPI
structure header which defines how many substructures of a given type
are present in the structure body. If the 'number of elements' field
is not parsed, we will have a dangling pointer which could cause a
problem later.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
2020-02-11 02:12:45 +00:00
..
Parsers ShellPkg/UefiShellAcpiViewCommandLib: Fix FADT Parser 2020-02-11 02:12:45 +00:00
AcpiParser.c ShellPkg: acpiview: Set ItemPtr to NULL for unprocessed table fields 2020-02-11 02:12:45 +00:00
AcpiParser.h ShellPkg: acpiview: Update SRAT parser to ACPI 6.3 2020-01-15 05:37:53 +00:00
AcpiTableParser.c ShellPkg: acpiview: Allow disabling consistency checks (-q flag) 2019-07-02 17:22:45 +08:00
AcpiTableParser.h ShellPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:25 -07:00
AcpiView.c ShellPkg/UefiShellAcpiViewCommandLib: Initialize local variables 2019-08-16 14:01:49 +08:00
AcpiView.h ShellPkg: acpiview: Allow disabling consistency checks (-q flag) 2019-07-02 17:22:45 +08:00
UefiShellAcpiViewCommandLib.c ShellPkg: acpiview: Add support for parsing FACS 2019-12-05 06:12:36 +00:00
UefiShellAcpiViewCommandLib.h ShellPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:25 -07:00
UefiShellAcpiViewCommandLib.inf ShellPkg: acpiview: Add support for parsing FACS 2019-12-05 06:12:36 +00:00
UefiShellAcpiViewCommandLib.uni ShellPkg: acpiview: Make '-h' option not require a parameter 2019-07-02 17:22:46 +08:00