sizeof(fmtstring) + 8 wasn't enough for the string; that won't cope with the

printed version.  Make a little more room for the bitmask_snprintf() call.
This commit is contained in:
tv 2000-08-08 19:59:41 +00:00
parent c70ada6428
commit 91537bce4a
3 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_interface.c,v 1.40 2000/08/07 18:46:30 tv Exp $ */
/* $NetBSD: db_interface.c,v 1.41 2000/08/08 19:59:41 tv Exp $ */
/*
* Mach Operating System
@ -823,7 +823,7 @@ db_dump_buf(addr, have_addr, count, modif)
"\012DONE\011DIRTY\010DELWRI\007CALL\006CACHE\005BUSY\004BAD"
"\003ASYNC\002NEEDCOMMIT\001AGE";
char sbuf[sizeof(flagnames) + 8];
char sbuf[sizeof(flagnames) + 64];
if (!have_addr) {
db_printf("No buf address\n");

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.52 2000/08/07 18:46:30 tv Exp $ */
/* $NetBSD: trap.c,v 1.53 2000/08/08 19:59:41 tv Exp $ */
/*
* Copyright (c) 1996
@ -512,7 +512,7 @@ trap(type, tstate, pc, tf)
#ifdef DEBUG
if ((trapdebug&TDB_NSAVED && cpcb->pcb_nsaved) || trapdebug&(TDB_FOLLOW|TDB_TRAP)) {
char sbuf[sizeof(PSTATE_BITS) + 8];
char sbuf[sizeof(PSTATE_BITS) + 64];
printf("trap: type 0x%x: pc=%lx &tf=%lx\n",
type, pc, tf);
@ -533,7 +533,7 @@ trap(type, tstate, pc, tf)
uvmexp.traps++;
#ifdef DEBUG
if ((trapdebug&(TDB_FOLLOW|TDB_TRAP)) || ((trapdebug & TDB_TL) && tl())) {
char sbuf[sizeof(PSTATE_BITS) + 8];
char sbuf[sizeof(PSTATE_BITS) + 64];
extern int trap_trace_dis;
trap_trace_dis = 1;
@ -627,7 +627,7 @@ dopanic:
trap_trace_dis = 1;
{
char sbuf[sizeof(PSTATE_BITS) + 8];
char sbuf[sizeof(PSTATE_BITS) + 64];
printf("trap type 0x%x: pc=%lx",
type, pc);

View File

@ -1,4 +1,4 @@
/* $NetBSD: btvmei.c,v 1.2 2000/08/08 19:42:40 tv Exp $ */
/* $NetBSD: btvmei.c,v 1.3 2000/08/08 20:06:48 tv Exp $ */
/*
* Copyright (c) 1999
@ -282,7 +282,7 @@ b3_617_reset(sc)
write_csr_byte(sc, LOC_CMD1, LC1_CLR_ERROR);
status = read_csr_byte(sc, LOC_STATUS);
if (status & LSR_CERROR_MASK) {
char sbuf[sizeof(BIT3_LSR_BITS) + 8];
char sbuf[sizeof(BIT3_LSR_BITS) + 64];
bitmask_snprintf(status, BIT3_LSR_BITS, sbuf, sizeof(sbuf));
printf("%s: interface error, lsr=%s\n", sc->sc_dev.dv_xname,