X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=binutils%2Fprdbg.c;h=1b376f485fecf04303d39b6240c1475e65e8dfa9;hb=0ac553107c601cc9c4c340338e0fc7e0ce8375cc;hp=5f14d32fb3f179def49ab144243654220524343f;hpb=af03af8f55f2536b6e20928e6b1fa0324a5f3d6e;p=deliverable%2Fbinutils-gdb.git diff --git a/binutils/prdbg.c b/binutils/prdbg.c index 5f14d32fb3..1b376f485f 100644 --- a/binutils/prdbg.c +++ b/binutils/prdbg.c @@ -1,5 +1,5 @@ /* prdbg.c -- Print out generic debugging information. - Copyright (C) 1995-2018 Free Software Foundation, Inc. + Copyright (C) 1995-2020 Free Software Foundation, Inc. Written by Ian Lance Taylor . Tags style generation written by Salvador E. Tropea . @@ -1624,7 +1624,7 @@ pr_tag_type (void *p, const char *name, unsigned int id, t = "union class "; break; default: - abort (); + /* PR 25625: Corrupt input can trigger this case. */ return FALSE; } @@ -1930,14 +1930,14 @@ find_address_in_section (bfd *abfd, asection *section, void *data) if (found) return; - if ((bfd_get_section_flags (abfd, section) & SEC_ALLOC) == 0) + if ((bfd_section_flags (section) & SEC_ALLOC) == 0) return; - vma = bfd_get_section_vma (abfd, section); + vma = bfd_section_vma (section); if (pc < vma) return; - size = bfd_get_section_size (section); + size = bfd_section_size (section); if (pc >= vma + size) return; @@ -2117,6 +2117,7 @@ tg_start_class_type (void *p, const char *tag, unsigned int id, struct pr_handle *info = (struct pr_handle *) p; char *tv = NULL; const char *name; + char idbuf[20]; info->indent += 2; @@ -2131,8 +2132,6 @@ tg_start_class_type (void *p, const char *tag, unsigned int id, name = tag; else { - char idbuf[20]; - sprintf (idbuf, "%%anon%u", id); name = idbuf; }