From: chefmax Date: Thu, 21 Jun 2018 05:42:53 +0000 (+0000) Subject: libbacktrace/ X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52458f0664a3430e6beb47af6893d09f70e8ef98;p=thirdparty%2Fgcc.git libbacktrace/ 2018-06-21 Denis Khalikov PR other/86198 * elf.c (elf_add): Increase ".note.gnu.build-id" section size checking up to 36 bytes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261832 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog index c01c7d826a9e..0c86e0c9d16e 100644 --- a/libbacktrace/ChangeLog +++ b/libbacktrace/ChangeLog @@ -1,3 +1,9 @@ +2018-06-21 Denis Khalikov + + 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 * configure: Regenerated. diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c index 0fd5e6f9d0d4..f4863f0bea58 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;