This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH dlltool] Clear .idata$6 before use
- From: Nicholas Clifton <nickc at redhat dot com>
- To: Stephen Kitt <steve at sk2 dot org>, binutils at sourceware dot org
- Date: Fri, 29 May 2015 11:07:02 +0100
- Subject: Re: [PATCH dlltool] Clear .idata$6 before use
- Authentication-results: sourceware.org; auth=none
- References: <20150528210446 dot 0837ff0e at heffalump dot sk2 dot org>
The memory allocated for .idata$6 in dlltool isn't cleared before use, which
can result in random data remaining after the import names. (I noticed this
when working on making DLLs build reproducibly.)
The following patch just memsets the allocated memory.
Thanks. You could have also just changed the xmalloc to xcalloc, but
there is just a minor point.
I have gone ahead and applied your patch along with this changelog entry.
2015-05-29 Stephen Kitt <email@example.com>
* dlltool.c (make_one_lib_file): Clear .idata$6 before use.