From: Thomas Veerman Date: Thu, 26 Jul 2012 15:17:25 +0000 (+0000) Subject: procfs: use safe string copy X-Git-Tag: v3.2.1~434 X-Git-Url: http://zhaoyanbai.com/repos/man.named-checkzone.html?a=commitdiff_plain;h=ca085c16ef4dd404fd72b62339cf3f716c7f9aae;p=minix.git procfs: use safe string copy --- 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);