Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Apr 2019 04:16:15 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r346782 - in stable: 11/usr.bin/dtc 12/usr.bin/dtc
Message-ID:  <201904270416.x3R4GFFE063089@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Sat Apr 27 04:16:15 2019
New Revision: 346782
URL: https://svnweb.freebsd.org/changeset/base/346782

Log:
  MFC r346469: 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.

Modified:
  stable/11/usr.bin/dtc/fdt.cc
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/usr.bin/dtc/fdt.cc
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/usr.bin/dtc/fdt.cc
==============================================================================
--- stable/11/usr.bin/dtc/fdt.cc	Sat Apr 27 04:12:32 2019	(r346781)
+++ stable/11/usr.bin/dtc/fdt.cc	Sat Apr 27 04:16:15 2019	(r346782)
@@ -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?201904270416.x3R4GFFE063089>