diff options
author | Alan Modra <amodra@bigpond.net.au> | 2002-06-25 09:40:45 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2002-06-25 09:40:45 +0000 |
commit | 6890b51d78db40c5fe6d5f190905d9d92f7d4148 (patch) | |
tree | 7f5705648a1ad70cc5d4c7d0fa07761cab3e5735 /bfd/linker.c | |
parent | 033d96c074ea431e9d66b92cb08139481c6ff273 (diff) | |
download | gdb-6890b51d78db40c5fe6d5f190905d9d92f7d4148.tar.gz |
* elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
* elf32-hppa.c (hppa_add_stub): Likewise.
* elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
* elflink.h (elf_add_default_symbol): Fix comment typo.
(elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
(elf_link_add_object_symbols): Likewise.
(elf_link_assign_sym_version): Likewise.
* hash.c (bfd_hash_lookup): Likewise.
* linker.c (_bfd_generic_link_add_one_symbol): Likewise.
* section.c (bfd_get_unique_section_name): Likewise.
* syms.c (_bfd_stab_section_find_nearest_line): Likewise.
* elf.c (_bfd_elf_make_section_from_phdr): Likewise.
(assign_section_numbers): Likewise.
(_bfd_elfcore_make_pseudosection): Likewise.
(elfcore_grok_lwpstatus): Likewise.
(elfcore_grok_win32pstatus): Likewise.
(elfcore_write_note): Constify input params. Use PTR instead of
void *. Include terminating NUL in namesz. Correct padding.
Support NULL "name" param. Use memcpy instead of strcpy.
(elfcore_write_prpsinfo): Constify input params.
(elfcore_write_prstatus): Likewise. Use PTR instead of void *.
(elfcore_write_lwpstatus): Likewise.
(elfcore_write_pstatus): Likewise.
(elfcore_write_prfpreg): Likewise.
(elfcore_write_prxfpreg): Likewise.
* elf-bfd.h (elfcore_write_note): Update declaration.
(elfcore_write_prpsinfo): Likewise.
(elfcore_write_prstatus): Likewise.
(elfcore_write_pstatus): Likewise.
(elfcore_write_prfpreg): Likewise.
(elfcore_write_prxfpreg): Likewise.
(elfcore_write_lwpstatus): Likewise.
Diffstat (limited to 'bfd/linker.c')
-rw-r--r-- | bfd/linker.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/linker.c b/bfd/linker.c index 0567a707c31..242f8bd7625 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -1974,12 +1974,12 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value, else { char *w; + size_t len = strlen (string) + 1; - w = bfd_hash_allocate (&info->hash->table, - strlen (string) + 1); + w = bfd_hash_allocate (&info->hash->table, len); if (w == NULL) return false; - strcpy (w, string); + memcpy (w, string, len); sub->u.i.warning = w; } |