* elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
[deliverable/binutils-gdb.git] / bfd / linker.c
index 0567a707c31d87dd81c7f9e35a49c93850d5ac60..242f8bd7625de2a78d9e1df12b4f69117acae91a 100644 (file)
@@ -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;
              }
 
This page took 0.026099 seconds and 4 git commands to generate.