summaryrefslogtreecommitdiff
path: root/bfd/pef.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/pef.c')
-rw-r--r--bfd/pef.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/pef.c b/bfd/pef.c
index b08202d153e..fb9a07abd15 100644
--- a/bfd/pef.c
+++ b/bfd/pef.c
@@ -217,7 +217,7 @@ bfd_pef_print_symbol (bfd *abfd,
fprintf (file, " %-5s %s", symbol->section->name, symbol->name);
if (CONST_STRNEQ (symbol->name, "__traceback_"))
{
- unsigned char *buf = alloca (symbol->udata.i);
+ unsigned char *buf = xmalloc (symbol->udata.i);
size_t offset = symbol->value + 4;
size_t len = symbol->udata.i;
int ret;
@@ -227,6 +227,7 @@ bfd_pef_print_symbol (bfd *abfd,
len, 0, NULL, file);
if (ret < 0)
fprintf (file, " [ERROR]");
+ free (buf);
}
}
}