summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2003-05-12 22:44:13 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2003-05-12 22:44:13 +0000
commitbf3e34f3526247d0497d436ab7e437ca22c79d17 (patch)
tree03f3d6ee968c6d8fe3122220a2e31b92625fae2d
parentb6ad9ab3ad3d1bfdd1244863c11c5e75cf918ab9 (diff)
use snprintf. ok mickey
-rw-r--r--sys/kern/kern_proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index b1ed6499de5..dc82f9405c0 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_proc.c,v 1.14 2003/05/12 19:56:03 mickey Exp $ */
+/* $OpenBSD: kern_proc.c,v 1.15 2003/05/12 22:44:12 tedu Exp $ */
/* $NetBSD: kern_proc.c,v 1.14 1996/02/09 18:59:41 christos Exp $ */
/*
@@ -397,7 +397,7 @@ proc_printit(struct proc *p, const char *modif, int (*pr)(const char *, ...))
const char *pst = pstbuf;
if (p->p_stat > sizeof(pstat)/sizeof(*pstat))
- sprintf(pstbuf, "%d", p->p_stat);
+ snprintf(pstbuf, sizeof(pstbuf), "%d", p->p_stat);
else
pst = pstat[(int)p->p_stat];