diff options
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r-- | sys/kern/subr_prf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index 641dd90fa88..4f1fab02321 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_prf.c,v 1.23 1998/04/04 18:36:32 deraadt Exp $ */ +/* $OpenBSD: subr_prf.c,v 1.24 1999/01/10 01:45:31 niklas Exp $ */ /* $NetBSD: subr_prf.c,v 1.45 1997/10/24 18:14:25 chuck Exp $ */ /*- @@ -569,13 +569,15 @@ vsprintf(buf, fmt, ap) va_list ap; { int savintr; + int len; savintr = consintr; /* disable interrupts */ consintr = 0; - kprintf(fmt, TOBUFONLY, NULL, buf, ap); + len = kprintf(fmt, TOBUFONLY, NULL, buf, ap); if (!panicstr) logwakeup(); consintr = savintr; /* reenable interrupts */ + buf[len] = 0; return (0); } |