aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Harmstone <mark@harmstone.com>2023-07-17 13:25:05 +0100
committerNick Clifton <nickc@redhat.com>2023-07-17 13:25:05 +0100
commit502045ab152f04de74a5c47bbef5f2fac856b751 (patch)
tree39f4d174b653d51bfa8ecaad8072a7bc1ccba5d4
parent80509af80c9b2f3a9d406bca3a17ef7f19e5121c (diff)
downloadgdb-502045ab152f04de74a5c47bbef5f2fac856b751.zip
gdb-502045ab152f04de74a5c47bbef5f2fac856b751.tar.gz
gdb-502045ab152f04de74a5c47bbef5f2fac856b751.tar.bz2
ld/PDB: fix off-by-1 in add_globals_ref()
-rw-r--r--ld/pdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/pdb.c b/ld/pdb.c
index 5e85f99..267da50 100644
--- 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++;