svn commit: r215105 - head/contrib/binutils/bfd
Colin Percival
cperciva at FreeBSD.org
Thu Nov 11 00:29:20 UTC 2010
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 ? */
More information about the svn-src-all
mailing list