]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ld/PDB: fix off-by-1 in add_globals_ref()
authorMark Harmstone <mark@harmstone.com>
Mon, 17 Jul 2023 12:25:05 +0000 (13:25 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 17 Jul 2023 12:25:05 +0000 (13:25 +0100)
ld/pdb.c

index 5e85f999c6b506e735a4e0a63a011356d9b85426..267da50c4a7641f4e435150b84fe5bf3c60e1f3e 100644 (file)
--- a/ld/pdb.c
+++ b/ld/pdb.c
@@ -880,7 +880,7 @@ add_globals_ref (struct globals *glob, bfd *sym_rec_stream, const char *name,
   g->offset = bfd_tell (sym_rec_stream);
   g->hash = hash;
   g->refcount = 1;
-  memcpy (g->data, data, len + 1);
+  memcpy (g->data, data, len);
 
   glob->num_entries++;