This is the mail archive of the binutils@sources.redhat.com 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]

Re: PATCH: Update nm.c for 64bit BFD on 32bit ELF files.



> +  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?

	Andrew



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