I noticed that the call to alloca in osabi.c can be replaced with a
statically-sized buffer, because some code just before the declaration
ensures that the length is bounded.
Reviewed-by: John Baldwin <jhb@FreeBSD.org>
{
const char *name;
unsigned int sectsize;
- char *note;
name = bfd_section_name (sect);
sectsize = bfd_section_size (sect);
compressed section. But, since note sections are not compressed,
deferring the reading until we recognize the section avoids any
error. */
- note = (char *) alloca (sectsize);
+ char note[MAX_NOTESZ];
/* .note.ABI-tag notes, used by GNU/Linux and FreeBSD. */
if (strcmp (name, ".note.ABI-tag") == 0)