projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4fb288
)
ld/PDB: fix off-by-1 in add_globals_ref()
author
Jan Beulich
<jbeulich@suse.com>
Tue, 11 Jul 2023 06:14:57 +0000
(08:14 +0200)
committer
Jan Beulich
<jbeulich@suse.com>
Tue, 11 Jul 2023 06:14:57 +0000
(08:14 +0200)
Copying one too many bytes can corrupt memory, detected/reported by
glibc on a 32-bit distro.
ld/pdb.c
patch
|
blob
|
history
diff --git
a/ld/pdb.c
b/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++;