procfs: use safe string copy

This commit is contained in:
Thomas Veerman
2012-07-30 09:44:58 +00:00
parent c21503bdf8
commit ca085c16ef
+1 -1
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);