diff options
author | Thiemo Seufer <ths@networkno.de> | 2001-08-24 03:56:28 +0000 |
---|---|---|
committer | Thiemo Seufer <ths@networkno.de> | 2001-08-24 03:56:28 +0000 |
commit | a28bab290ab18741390478ddfe535763664ab8dc (patch) | |
tree | b8c9b24b69e120069ff3a9f10772224337b4e63a /bfd/linker.c | |
parent | 024aa154b5f3db045cf8cf519612a9d603f02547 (diff) | |
download | gdb-a28bab290ab18741390478ddfe535763664ab8dc.tar.gz |
* linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
by bfd_malloc().
Diffstat (limited to 'bfd/linker.c')
-rw-r--r-- | bfd/linker.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/linker.c b/bfd/linker.c index 00389aca6c2..89b95269154 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) { |