Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Sep 2019 14:08:08 -0000
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r346469 - head/usr.bin/dtc
Message-ID:  <201904210158.x3L1wgqH067712@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Sun Apr 21 01:58:42 2019
New Revision: 346469
URL: https://svnweb.freebsd.org/changeset/base/346469

Log:
  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

Modified:
  head/usr.bin/dtc/fdt.cc

Modified: head/usr.bin/dtc/fdt.cc
==============================================================================
--- head/usr.bin/dtc/fdt.cc	Sun Apr 21 01:33:13 2019	(r346468)
+++ head/usr.bin/dtc/fdt.cc	Sun Apr 21 01:58:42 2019	(r346469)
@@ -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
 		{





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904210158.x3L1wgqH067712>