X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=binutils%2Fprdbg.c;h=1b376f485fecf04303d39b6240c1475e65e8dfa9;hb=d2d1ea20aef6ed97232280b5e15a52b8d7dc7b7d;hp=40cf54b8fe948eae493a06fba3188c9a07fed310;hpb=fd3619828e94a24a92cddec42cbc0ab33352eeb4;p=deliverable%2Fbinutils-gdb.git diff --git a/binutils/prdbg.c b/binutils/prdbg.c index 40cf54b8fe..1b376f485f 100644 --- a/binutils/prdbg.c +++ b/binutils/prdbg.c @@ -1,5 +1,5 @@ /* prdbg.c -- Print out generic debugging information. - Copyright (C) 1995-2019 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; } @@ -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; }