Date: Wed, 21 Dec 2016 15:38:28 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@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: r310368 - stable/11/contrib/binutils/bfd Message-ID: <201612211538.uBLFcSNc020404@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Wed Dec 21 15:38:28 2016 New Revision: 310368 URL: https://svnweb.freebsd.org/changeset/base/310368 Log: MFC r310132: libbfd: make sure variables are initialized before using them. Initialize l_sec_contents to make sure that free(l_sec_contents) is called on valid pointers. Obtained from: OpenBSD (partial CVS rev 1.18) Modified: stable/11/contrib/binutils/bfd/elflink.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/binutils/bfd/elflink.c ============================================================================== --- stable/11/contrib/binutils/bfd/elflink.c Wed Dec 21 15:26:59 2016 (r310367) +++ stable/11/contrib/binutils/bfd/elflink.c Wed Dec 21 15:38:28 2016 (r310368) @@ -11487,7 +11487,7 @@ _bfd_elf_section_already_linked (bfd *ab abfd, sec); else if (sec->size != 0) { - bfd_byte *sec_contents, *l_sec_contents; + bfd_byte *sec_contents, *l_sec_contents = NULL; if (!bfd_malloc_and_get_section (abfd, sec, &sec_contents)) (*_bfd_error_handler)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612211538.uBLFcSNc020404>