procfs: use safe string copy

This commit is contained in:
Thomas Veerman 2012-07-26 15:17:25 +00:00
parent c21503bdf8
commit ca085c16ef

View file

@ -282,7 +282,7 @@ static void construct_pid_dirs(void)
pid = mproc[i - NR_TASKS].mp_pid;
/* Add the entry for the process slot. */
sprintf(name, "%d", pid);
snprintf(name, PNAME_MAX + 1, "%d", pid);
make_stat(&stat, i, NO_INDEX);