summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/bfd
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2010-11-11 00:29:19 +0000
committercperciva <cperciva@FreeBSD.org>2010-11-11 00:29:19 +0000
commit433c390cb42236ee4f9fd7761683c20e148407f7 (patch)
treec5363f8c633d0fac0650e52fcb40e46a3fdd8447 /contrib/binutils/bfd
parent7c21b2dc776561c04503f878a0243a3db8dd2830 (diff)
downloadFreeBSD-src-433c390cb42236ee4f9fd7761683c20e148407f7.zip
FreeBSD-src-433c390cb42236ee4f9fd7761683c20e148407f7.tar.gz
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
Diffstat (limited to 'contrib/binutils/bfd')
-rw-r--r--contrib/binutils/bfd/opncls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/binutils/bfd/opncls.c b/contrib/binutils/bfd/opncls.c
index 6abd405..ac025e5 100644
--- a/contrib/binutils/bfd/opncls.c
+++ b/contrib/binutils/bfd/opncls.c
@@ -1151,7 +1151,7 @@ bfd_fill_in_gnu_debuglink_section (bfd *abfd,
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 ? */
OpenPOWER on IntegriCloud