PARSER_PARAMS (ProcessorHierarchyNodeStructureParser)\r
);\r
\r
+ // Check if the values used to control the parsing logic have been\r
+ // successfully read.\r
+ if (NumberOfPrivateResources == NULL) {\r
+ IncrementErrorCount ();\r
+ Print (\r
+ L"ERROR: Insufficient Processor Hierarchy Node length. Length = %d.\n",\r
+ Length\r
+ );\r
+ return;\r
+ }\r
+\r
// Make sure the Private Resource array lies inside this structure\r
if (Offset + (*NumberOfPrivateResources * sizeof (UINT32)) > Length) {\r
IncrementErrorCount ();\r
AcpiTableLength,\r
PARSER_PARAMS (PpttParser)\r
);\r
+\r
ProcessorTopologyStructurePtr = Ptr + Offset;\r
\r
while (Offset < AcpiTableLength) {\r
PARSER_PARAMS (ProcessorTopologyStructureHeaderParser)\r
);\r
\r
+ // Check if the values used to control the parsing logic have been\r
+ // successfully read.\r
+ if ((ProcessorTopologyStructureType == NULL) ||\r
+ (ProcessorTopologyStructureLength == NULL)) {\r
+ IncrementErrorCount ();\r
+ Print (\r
+ L"ERROR: Insufficient remaining table buffer length to read the " \\r
+ L"processor topology structure header. Length = %d.\n",\r
+ AcpiTableLength - Offset\r
+ );\r
+ return;\r
+ }\r
+\r
// Make sure the PPTT structure lies inside the table\r
if ((Offset + *ProcessorTopologyStructureLength) > AcpiTableLength) {\r
IncrementErrorCount ();\r