re PR other/86198 (Libbacktrace does not properly work with ".note.gnu.build-id"...
authorDenis Khalikov <d.khalikov@partner.samsung.com>
Thu, 21 Jun 2018 05:42:53 +0000 (05:42 +0000)
committerMaxim Ostapenko <chefmax@gcc.gnu.org>
Thu, 21 Jun 2018 05:42:53 +0000 (08:42 +0300)
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

libbacktrace/ChangeLog
libbacktrace/elf.c

index c01c7d826a9e59cb3e9c0ee5c6e0d6c04da8e61e..0c86e0c9d16e686046572c2acee68d73a626d8c0 100644 (file)
@@ -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.
index 0fd5e6f9d0d45bd3acbe131a8a30a0fa38afbf0d..f4863f0bea58facce28c69e543258245cb05092c 100644 (file)
@@ -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 = &note->name[0] + ((note->namesz + 3) & ~ 3);
              buildid_size = note->descsz;