From bf3e34f3526247d0497d436ab7e437ca22c79d17 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Mon, 12 May 2003 22:44:13 +0000 Subject: use snprintf. ok mickey --- sys/kern/kern_proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/kern') 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]; -- cgit v1.2.3