ShellPkg: acpiview: MADT: Prevent buffer overruns

Modify the parsing logic to prevent reading past the MADT table buffer
length provided when parsing the Interrupt Controller Structure header.

Signed-off-by: Krzysztof Koch <krzysztof.koch@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@inte.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
Krzysztof Koch 2019-08-01 16:44:05 -07:00 committed by Jaben Carsey
parent 62cefaf44e
commit 05d402952d
1 changed files with 1 additions and 1 deletions

View File

@ -256,7 +256,7 @@ ParseAcpiMadt (
0,
NULL,
InterruptContollerPtr,
2, // Length is 1 byte at offset 1
AcpiTableLength - Offset,
PARSER_PARAMS (MadtInterruptControllerHeaderParser)
);