aboutsummaryrefslogtreecommitdiff
path: root/bfd/linker.c
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2001-08-24 03:56:28 +0000
committerThiemo Seufer <ths@networkno.de>2001-08-24 03:56:28 +0000
commitf6be24f9a4bd68f883dd4d2a78256d9b3eb8a420 (patch)
treede8bee3c769091d63aa19ac89457d50d17740567 /bfd/linker.c
parentd586919e5fcb2002442e0f2709e51c4b13279b5b (diff)
downloadgdb-f6be24f9a4bd68f883dd4d2a78256d9b3eb8a420.zip
gdb-f6be24f9a4bd68f883dd4d2a78256d9b3eb8a420.tar.gz
gdb-f6be24f9a4bd68f883dd4d2a78256d9b3eb8a420.tar.bz2
* linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
by bfd_malloc().
Diffstat (limited to 'bfd/linker.c')
-rw-r--r--bfd/linker.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/linker.c b/bfd/linker.c
index 00389ac..89b9526 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -1007,9 +1007,13 @@ _bfd_generic_link_add_archive_symbols (abfd, info, checkfn)
let's look for its import thunk */
if (info->pei386_auto_import)
{
- char *buf = alloca (strlen (h->root.string) + 10);
+ char *buf = (char *) bfd_malloc (strlen (h->root.string) + 10);
+ if (buf == NULL)
+ return false;
+
sprintf (buf, "__imp_%s", h->root.string);
arh = archive_hash_lookup (&arsym_hash, buf, false, false);
+ free(buf);
}
if (arh == (struct archive_hash_entry *) NULL)
{