From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H . J . Lu" To: Andrew Cagney Cc: binutils@sourceware.cygnus.com Subject: Re: PATCH: Update nm.c for 64bit BFD on 32bit ELF files. Date: Fri, 24 Aug 2001 16:45:00 -0000 Message-id: <20010824164507.A12244@lucon.org> References: <20010824153533.A11079@lucon.org> <3B86DFCE.2070605@cygnus.com> X-SW-Source: 2001-08/msg00586.html On Fri, Aug 24, 2001 at 07:14:22PM -0400, Andrew Cagney wrote: > > > + char buf[30]; > > > > if (! dynamic) > > { > > @@ -960,6 +966,9 @@ display_rel_file (abfd, archive_bfd) > > return; > > } > > > > + bfd_sprintf_vma (abfd, buf, (bfd_vma) -1); > > + print_width = strlen (buf); > > + > > Hmm, the most popular security hole and a generally popular bug is > buffer overrun on the stack. Is hardwiring a buffer allocated of the > stack and then sprintf() into it really a good idea? We know bfd_sprintf_vma will at most print a 64bit address in hex. H.J.