Representation of max 32-bit integer is 10 chars.
The potential issue is observed by GCC 7 targeted to AArch64.
sim/common/ChangeLog:
2019-12-01  Pavel I. Kryukov  <kryukov@frtk.ru>
	* sim-utils.c: Prevent buffer overflow.
+2019-12-01  Pavel I. Kryukov  <kryukov@frtk.ru>
+
+       * sim-utils.c: Prevent buffer overflow.
+
 2019-09-23  Dimitar Dimitrov  <dimitar@dinux.eu>
 
        * gennltvals.sh: Add PRU libgloss target.
 
     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;
       }
     }
     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;
       }
     }