/** @file\r
SLIT table parser\r
\r
- Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.\r
+ Copyright (c) 2016 - 2019, ARM Limited. All rights reserved.\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
@par Reference(s):\r
AcpiTableLength,\r
PARSER_PARAMS (SlitParser)\r
);\r
- LocalityPtr = Ptr + Offset;\r
\r
+ // Check if the values used to control the parsing logic have been\r
+ // successfully read.\r
+ if (SlitSystemLocalityCount == NULL) {\r
+ IncrementErrorCount ();\r
+ Print (\r
+ L"ERROR: Insufficient table length. AcpiTableLength = %d.\n",\r
+ AcpiTableLength\r
+ );\r
+ return;\r
+ }\r
+\r
+ LocalityPtr = Ptr + Offset;\r
LocalityCount = *SlitSystemLocalityCount;\r
+\r
// We only print the Localities if the count is less than 16\r
// If the locality count is more than 16 then refer to the\r
// raw data dump.\r