diff options
author | Denis Khalikov <d.khalikov@partner.samsung.com> | 2018-06-21 05:42:53 +0000 |
---|---|---|
committer | Maxim Ostapenko <chefmax@gcc.gnu.org> | 2018-06-21 08:42:53 +0300 |
commit | 1ac6620a52ced600f617eb7018899f7a67cc6d83 (patch) | |
tree | 5300704fb35fe9ddeb76993257de7333570e9abd /libbacktrace | |
parent | 802743baca133c1ec130706120fb6cde138cbc46 (diff) | |
download | gcc-1ac6620a52ced600f617eb7018899f7a67cc6d83.zip gcc-1ac6620a52ced600f617eb7018899f7a67cc6d83.tar.gz gcc-1ac6620a52ced600f617eb7018899f7a67cc6d83.tar.bz2 |
re PR other/86198 (Libbacktrace does not properly work with ".note.gnu.build-id" section)
libbacktrace/
2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>
PR other/86198
* elf.c (elf_add): Increase ".note.gnu.build-id" section size
checking up to 36 bytes.
From-SVN: r261832
Diffstat (limited to 'libbacktrace')
-rw-r--r-- | libbacktrace/ChangeLog | 6 | ||||
-rw-r--r-- | libbacktrace/elf.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog index c01c7d8..0c86e0c 100644 --- a/libbacktrace/ChangeLog +++ b/libbacktrace/ChangeLog @@ -1,3 +1,9 @@ +2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com> + + PR other/86198 + * elf.c (elf_add): Increase ".note.gnu.build-id" section size + checking up to 36 bytes. + 2018-04-24 H.J. Lu <hongjiu.lu@intel.com> * configure: Regenerated. diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c index 0fd5e6f..f4863f0 100644 --- a/libbacktrace/elf.c +++ b/libbacktrace/elf.c @@ -2868,7 +2868,7 @@ elf_add (struct backtrace_state *state, const char *filename, int descriptor, if (note->type == NT_GNU_BUILD_ID && note->namesz == 4 && strncmp (note->name, "GNU", 4) == 0 - && shdr->sh_size < 12 + ((note->namesz + 3) & ~ 3) + note->descsz) + && shdr->sh_size <= 12 + ((note->namesz + 3) & ~ 3) + note->descsz) { buildid_data = ¬e->name[0] + ((note->namesz + 3) & ~ 3); buildid_size = note->descsz; |