summaryrefslogtreecommitdiff
path: root/sim/common/sim-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/common/sim-utils.c')
-rw-r--r--sim/common/sim-utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c
index e83a2e4d0c8..0c46662ff33 100644
--- a/sim/common/sim-utils.c
+++ b/sim/common/sim-utils.c
@@ -355,8 +355,8 @@ map_to_str (unsigned map)
case io_map: return "io";
default:
{
- static char str[10];
- sprintf (str, "(%ld)", (long) map);
+ static char str[16];
+ snprintf (str, sizeof(str), "(%ld)", (long) map);
return str;
}
}
@@ -385,8 +385,8 @@ access_to_str (unsigned access)
case access_read_write_exec_io: return "read_write_exec_io";
default:
{
- static char str[10];
- sprintf (str, "(%ld)", (long) access);
+ static char str[16];
+ snprintf (str, sizeof(str), "(%ld)", (long) access);
return str;
}
}