From owner-svn-src-stable@FreeBSD.ORG Wed Mar 4 01:10:10 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BFCEEBA; Wed, 4 Mar 2015 01:10:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2663187C; Wed, 4 Mar 2015 01:10:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t241A9Hf012455; Wed, 4 Mar 2015 01:10:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t241A92T012454; Wed, 4 Mar 2015 01:10:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503040110.t241A92T012454@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 4 Mar 2015 01:10:09 +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: r279572 - stable/10/contrib/binutils/bfd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2015 01:10:10 -0000 Author: emaste Date: Wed Mar 4 01:10:09 2015 New Revision: 279572 URL: https://svnweb.freebsd.org/changeset/base/279572 Log: MFC r279301: GNU nm: Avoid NULL dereference bfd_dwarf2_find_line() calls find_line() with NULL functionname_ptr, which resulted in a crash on certain ELF objects. This change was implemented independently from upstream binutils, but I have checked that the crash does not happen there. Sponsored by: The FreeBSD Foundation Modified: stable/10/contrib/binutils/bfd/dwarf2.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/binutils/bfd/dwarf2.c ============================================================================== --- stable/10/contrib/binutils/bfd/dwarf2.c Tue Mar 3 23:20:18 2015 (r279571) +++ stable/10/contrib/binutils/bfd/dwarf2.c Wed Mar 4 01:10:09 2015 (r279572) @@ -2382,7 +2382,8 @@ find_line (bfd *abfd, else addr += section->vma; *filename_ptr = NULL; - *functionname_ptr = NULL; + if (!do_line) + *functionname_ptr = NULL; *linenumber_ptr = 0; if (! *pinfo)