From: Bernd Edlinger Date: Mon, 23 Jul 2018 12:48:48 +0000 (+0000) Subject: 2018-07-23 Bernd Edlinger X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=723f415edcc9d560beb82983d28ea0607d3c5286;p=gcc.git 2018-07-23 Bernd Edlinger hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf. From-SVN: r262931 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1bf8b46fb18..13cc870ed54 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2018-07-23 Bernd Edlinger + + hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf. + 2018-07-23 Segher Boessenkool * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust. diff --git a/gcc/hsa-dump.c b/gcc/hsa-dump.c index 4ee53c81277..1407475b0c8 100644 --- a/gcc/hsa-dump.c +++ b/gcc/hsa-dump.c @@ -776,11 +776,11 @@ static void dump_hsa_symbol (FILE *f, hsa_symbol *symbol) { const char *name; + char buf[64]; if (symbol->m_name) name = symbol->m_name; else { - char buf[64]; sprintf (buf, "__%s_%i", hsa_seg_name (symbol->m_segment), symbol->m_name_number);