Skip to content
Permalink
Browse files

Fix segfault when errors happen while compiling a path-ref node

node::parse will return 0 instead of a valid pointer if the node it parsed was
ultimately not valid.  This bit failed to check for that.
  • Loading branch information...
kevans91 authored and davidchisnall committed Apr 11, 2019
1 parent c431171 commit e5ecf9319fd3f9390d1f7290bf1c385f47c7a763
Showing with 4 additions and 1 deletion.
  1. +4 −1 fdt.cc
5 fdt.cc
@@ -1622,7 +1622,10 @@ device_tree::parse_file(text_input_buffer &input,
}
input.next_token();
n = node::parse(input, *this, std::move(name), string_set(), string(), &defines);
n->name_is_path_reference = name_is_path_reference;
if (n)
{
n->name_is_path_reference = name_is_path_reference;
}
}
else
{

0 comments on commit e5ecf93

Please sign in to comment.
You can’t perform that action at this time.