You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the loop processing children, the code incorrectly uses node->FirstChildElement() instead of child->Name(). When an unknown node type (":eq") is encountered, the code doesn't check if it was found in registered_nodes before accessing.
Impact
Memory access violation/segfault when processing XML with unknown node types
Logic error: validation only checks the first child repeatedly, missing issues with other children
Description
Two related issues in BehaviorTreeFactory's XML verification can lead to crashes when processing XML nodes:
BehaviorTree.CPP/src/xml_parsing.cpp
Lines 547 to 553 in 48f6c5b
Found in commit: 48f6c5b
Bug Class
Memory Safety - Null Pointer Dereference
Crash Details
The crash occurs in
VerifyXML()
at line 553:Root Cause
In the loop processing children, the code incorrectly uses
node->FirstChildElement()
instead ofchild->Name()
. When an unknown node type (":eq") is encountered, the code doesn't check if it was found inregistered_nodes
before accessing.Impact
Proposed Fix
Additional Notes
The text was updated successfully, but these errors were encountered: