check_graph_node() dereferences node->parent without checking whether it is NULL first (i.e. the root node).
As a result a segmentation fault occurs for dts files which contain an 'endpoint' node as a direct child of the
root node. This type of error can easily happen when a 'remote-endpoint' property is
accidentally placed outside the corresponding endpoint and port nodes.
check_graph_node()
dereferencesnode->parent
without checking whether it isNULL
first (i.e. the root node). As a result a segmentation fault occurs for dts files which contain an 'endpoint' node as a direct child of the root node. This type of error can easily happen when a 'remote-endpoint' property is accidentally placed outside the corresponding endpoint and port nodes.Minimal example with 'endpoint' node:
Minimal example with remote-endpoint property:
While fixing above issue I ran into an assertion in
check_graph_child_address
which can be triggered with the following example:The condition that triggers this issue is actually caught by
check_graph_port()
, howevercheck_graph_child_address()
runs first hiding the warning.