Date: Thu, 11 Nov 2010 00:29:19 +0000 (UTC) From: Colin Percival <cperciva@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r215105 - head/contrib/binutils/bfd Message-ID: <201011110029.oAB0TJPi041904@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cperciva Date: Thu Nov 11 00:29:19 2010 New Revision: 215105 URL: http://svn.freebsd.org/changeset/base/215105 Log: Zero the buffer containing the .gnu_debuglink section before writing into it. Prior to this commit the .gnu_debuglink section can have up to 3 bytes of uninitialized garbage; as a result, .ko files could change vary between builds. Approved by: dim MFC after: 7 days Modified: head/contrib/binutils/bfd/opncls.c Modified: head/contrib/binutils/bfd/opncls.c ============================================================================== --- head/contrib/binutils/bfd/opncls.c Wed Nov 10 23:45:44 2010 (r215104) +++ head/contrib/binutils/bfd/opncls.c Thu Nov 11 00:29:19 2010 (r215105) @@ -1151,7 +1151,7 @@ bfd_fill_in_gnu_debuglink_section (bfd * debuglink_size &= ~3; debuglink_size += 4; - contents = malloc (debuglink_size); + contents = bfd_zmalloc (debuglink_size); if (contents == NULL) { /* XXX Should we delete the section from the bfd ? */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011110029.oAB0TJPi041904>