From owner-svn-src-stable-10@freebsd.org  Thu Sep 21 20:59:37 2017
Return-Path: <owner-svn-src-stable-10@freebsd.org>
Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AC94E222CC;
 Thu, 21 Sep 2017 20:59:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 674406A98A;
 Thu, 21 Sep 2017 20:59:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LKxak2041982;
 Thu, 21 Sep 2017 20:59:36 GMT (envelope-from jhb@FreeBSD.org)
Received: (from jhb@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LKxaVi041981;
 Thu, 21 Sep 2017 20:59:36 GMT (envelope-from jhb@FreeBSD.org)
Message-Id: <201709212059.v8LKxaVi041981@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org
 using -f
From: John Baldwin <jhb@FreeBSD.org>
Date: Thu, 21 Sep 2017 20:59:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject: svn commit: r323877 - in stable: 10/libexec/rtld-elf
 11/libexec/rtld-elf
X-SVN-Group: stable-10
X-SVN-Commit-Author: jhb
X-SVN-Commit-Paths: in stable: 10/libexec/rtld-elf 11/libexec/rtld-elf
X-SVN-Commit-Revision: 323877
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable-10@freebsd.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: SVN commit messages for only the 10-stable src tree
 <svn-src-stable-10.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-stable-10>, 
 <mailto:svn-src-stable-10-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable-10/>
List-Post: <mailto:svn-src-stable-10@freebsd.org>
List-Help: <mailto:svn-src-stable-10-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10>, 
 <mailto:svn-src-stable-10-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Sep 2017 20:59:37 -0000

Author: jhb
Date: Thu Sep 21 20:59:36 2017
New Revision: 323877
URL: https://svnweb.freebsd.org/changeset/base/323877

Log:
  MFC 323025: Read max_stack_flags from correct object.
  
  'obj' is not initialized here.
  
  Sponsored by:	DARPA / AFRL

Modified:
  stable/10/libexec/rtld-elf/rtld.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/libexec/rtld-elf/rtld.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/libexec/rtld-elf/rtld.c
==============================================================================
--- stable/10/libexec/rtld-elf/rtld.c	Thu Sep 21 20:34:33 2017	(r323876)
+++ stable/10/libexec/rtld-elf/rtld.c	Thu Sep 21 20:59:36 2017	(r323877)
@@ -470,7 +470,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr
 	close(fd);
 	if (obj_main == NULL)
 	    rtld_die();
-	max_stack_flags = obj->stack_flags;
+	max_stack_flags = obj_main->stack_flags;
     } else {				/* Main program already loaded. */
 	const Elf_Phdr *phdr;
 	int phnum;