From ca085c16ef4dd404fd72b62339cf3f716c7f9aae Mon Sep 17 00:00:00 2001 From: Thomas Veerman Date: Thu, 26 Jul 2012 15:17:25 +0000 Subject: [PATCH] procfs: use safe string copy --- servers/procfs/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/procfs/tree.c b/servers/procfs/tree.c index 35c0a6f5a..26848e962 100644 --- a/servers/procfs/tree.c +++ b/servers/procfs/tree.c @@ -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);