aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2018-07-23 12:48:48 +0000
committerBernd Edlinger <edlinger@gcc.gnu.org>2018-07-23 12:48:48 +0000
commit723f415edcc9d560beb82983d28ea0607d3c5286 (patch)
tree86e5e9a026dc629e54eec2401bcd0942a080599f /gcc
parent9fede15c4d5f7873ed906eb8cddee7cb35d2cec4 (diff)
downloadgcc-723f415edcc9d560beb82983d28ea0607d3c5286.zip
gcc-723f415edcc9d560beb82983d28ea0607d3c5286.tar.gz
gcc-723f415edcc9d560beb82983d28ea0607d3c5286.tar.bz2
2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf. From-SVN: r262931
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/hsa-dump.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1bf8b46..13cc870 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
+
2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
diff --git a/gcc/hsa-dump.c b/gcc/hsa-dump.c
index 4ee53c8..1407475 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);