summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/top/display.c4
-rw-r--r--contrib/top/top.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/contrib/top/display.c b/contrib/top/display.c
index 09c5d64..2a39072 100644
--- a/contrib/top/display.c
+++ b/contrib/top/display.c
@@ -7,6 +7,8 @@
*
* Copyright (c) 1984, 1989, William LeFebvre, Rice University
* Copyright (c) 1989, 1990, 1992, William LeFebvre, Northwestern University
+ *
+ * $FreeBSD$
*/
/*
@@ -829,7 +831,7 @@ caddr_t a1, a2, a3;
register int i;
/* first, format the message */
- (void) sprintf(next_msg, msgfmt, a1, a2, a3);
+ (void) snprintf(next_msg, sizeof(next_msg), msgfmt, a1, a2, a3);
if (msglen > 0)
{
diff --git a/contrib/top/top.c b/contrib/top/top.c
index 51cd3f0..3123a0d 100644
--- a/contrib/top/top.c
+++ b/contrib/top/top.c
@@ -10,6 +10,8 @@ char *copyright =
*
* Copyright (c) 1984, 1989, William LeFebvre, Rice University
* Copyright (c) 1989, 1990, 1992, William LeFebvre, Northwestern University
+ *
+ * $FreeBSD$
*/
/*
@@ -807,7 +809,7 @@ Usage: %s [-ISbinqut] [-d x] [-s x] [-o field] [-U username] [number]\n",
{
if ((errmsg = kill_procs(tempbuf2)) != NULL)
{
- new_message(MT_standout, errmsg);
+ new_message(MT_standout, "%s", errmsg);
putchar('\r');
no_command = Yes;
}
OpenPOWER on IntegriCloud