mirror of
https://github.com/acpica/acpica/
synced 2025-02-25 18:04:08 +03:00
Add error checks to prevent faults.
Added additional error checking to prevent run-time faults.
This commit is contained in:
parent
dcba62db2e
commit
76a3fdcfd6
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: exstore - AML Interpreter object store support
|
||||
* $Revision: 1.204 $
|
||||
* $Revision: 1.205 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -295,10 +295,19 @@ AcpiExDoDebugObject (
|
||||
}
|
||||
}
|
||||
else if (SourceDesc->Reference.Node)
|
||||
{
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (SourceDesc->Reference.Node) !=
|
||||
ACPI_DESC_TYPE_NAMED)
|
||||
{
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT,
|
||||
" %p - Not a valid namespace node\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
AcpiExDoDebugObject ((SourceDesc->Reference.Node)->Object,
|
||||
Level+4, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* Module Name: nsnames - Name manipulation and search
|
||||
* $Revision: 1.98 $
|
||||
* $Revision: 1.99 $
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
@ -277,6 +277,11 @@ AcpiNsGetPathnameLength (
|
||||
|
||||
while (NextNode && (NextNode != AcpiGbl_RootNode))
|
||||
{
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE (NextNode) != ACPI_DESC_TYPE_NAMED)
|
||||
{
|
||||
ACPI_ERROR ((AE_INFO, "Invalid NS Node (%X) while traversing path", NextNode));
|
||||
return 0;
|
||||
}
|
||||
Size += ACPI_PATH_SEGMENT_LENGTH;
|
||||
NextNode = AcpiNsGetParentNode (NextNode);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user