diff options
author | Jan Beulich <jbeulich@suse.com> | 2023-07-11 08:14:57 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2023-07-11 08:14:57 +0200 |
commit | eb70d820e85d1a10c3838088c4b551eef01efa61 (patch) | |
tree | 6d16bbff6a54a248f0267414509a449c967c69d2 | |
parent | c4fb288bbbe28b67534094365ada28f5de85e3ae (diff) | |
download | gdb-eb70d820e85d1a10c3838088c4b551eef01efa61.zip gdb-eb70d820e85d1a10c3838088c4b551eef01efa61.tar.gz gdb-eb70d820e85d1a10c3838088c4b551eef01efa61.tar.bz2 |
ld/PDB: fix off-by-1 in add_globals_ref()
Copying one too many bytes can corrupt memory, detected/reported by
glibc on a 32-bit distro.
-rw-r--r-- | ld/pdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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++; |