diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-08-24 21:10:15 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-08-24 21:10:15 +0000 |
commit | d19d8539ef326165f6592a33dc18a8b23062b576 (patch) | |
tree | d6546ab48f7b64651473a0d1d09e223d3cad2939 /sys/ddb | |
parent | 13a4827ce97e9cedd07345fcde3fb452c2e00d01 (diff) |
Off-by-one in ``dmesg'' command; it takes a vax to find such bugs.
Diffstat (limited to 'sys/ddb')
-rw-r--r-- | sys/ddb/db_command.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 24e58cd1262..6e6906bb871 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.c,v 1.43 2006/07/11 21:17:58 mickey Exp $ */ +/* $OpenBSD: db_command.c,v 1.44 2006/08/24 21:10:14 miod Exp $ */ /* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */ /* @@ -662,7 +662,7 @@ db_dmesg_cmd(db_expr_t addr, int haddr, db_expr_t count, char *modif) off = 0; for (i = 0, p = msgbufp->msg_bufc + off; i < msgbufp->msg_bufs; i++, p++) { - if (p > msgbufp->msg_bufc + msgbufp->msg_bufs) + if (p >= msgbufp->msg_bufc + msgbufp->msg_bufs) p = msgbufp->msg_bufc; if (*p != '\0') db_putchar(*p); |