This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][AVR] fix unsafe uses of sprintf


Hi mszanetti,

[Sorry for the delay in replying to your email]

Sorry I am just a NOOB ... What should I do to use the patch for fixing the
issue below?

Short answer: Apply it to the sources and rebuild the toolchain.


Long answer: Get hold of a copy of the binutils sources. Either the current release (2.19.1) or the latest development sources. See:

http://www.gnu.org/software/binutils/binutils.html

For details on how to get the sources. Then apply the patch to the sources. This is normally done using the "patch" program which is installed on most systems, (well at least those that have been set up to do development work), but you can also apply it by hand. The patch file makes it fairly obvious what is being done.

Next build a new toolchain. See the file binutils/README in the sources for some help on this. You will want to configure your toolchain for the avr target so you will probably do something like this:

% mkdir build
% cd build
% <path-to-patched-sources>/configure --target=avr-elf --prefix=/<where-to-install-the-new-toolchain>
% make
% make install


Now you can use the patched and rebuilt toolchain and rejoice in the knowledge that you are not going to run into trouble over an esoteric and highly unlikely buffer overflow bug. :-)

Cheers
  Nick



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]