binutils/binutils-linker-string-copy.patch

12 lines
462 B
Diff

--- binutils.orig/ld/pe-dll.c 2021-05-07 10:47:12.145769068 +0100
+++ binutils-2.35.2/ld/pe-dll.c 2021-05-07 11:01:43.000450119 +0100
@@ -3032,7 +3032,7 @@ pe_find_cdecl_alias_match (struct bfd_li
if (pe_details->underscored)
lname[0] = '_';
else
- strcpy (lname, lname + 1);
+ memmove (lname, lname + 1, strlen (lname));
key.key = lname;
kv = bsearch (&key, udef_table, undef_count,
sizeof (struct key_value), undef_sort_cmp);