1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-01 12:19:28 +00:00

dtc(1): Pull in fix for segfault-upon-error condition

Specifically, parse errors within a node would lead to a segfault due to
an unconditional dereference after emitting the error.

Obtained from:	https://github.com/davidchisnall/dtc/commit/e5ecf9319fd3f
MFC after:	3 days
This commit is contained in:
Kyle Evans 2019-04-21 01:58:42 +00:00
parent de2a04f2e2
commit 7251c2d8bc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346469

View File

@ -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
{