summaryrefslogtreecommitdiff
path: root/lib/libpthread/pthread_debug.c
diff options
context:
space:
mode:
authornathanw <nathanw@NetBSD.org>2003-04-16 17:37:47 +0000
committernathanw <nathanw@NetBSD.org>2003-04-16 17:37:47 +0000
commit8114703654b2da05e1488b0f8bceac4b3bef88d9 (patch)
tree9b23b39069dd9d024ed6cf4de8c1ec5adb1ede81 /lib/libpthread/pthread_debug.c
parent1a4ff7f91d1a3f55740ef33f293eb21fd48deea8 (diff)
Fix a fencepost error in writing to the debug buffer.
Diffstat (limited to 'lib/libpthread/pthread_debug.c')
-rw-r--r--lib/libpthread/pthread_debug.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libpthread/pthread_debug.c b/lib/libpthread/pthread_debug.c
index 80d6aa106d9..dd5ebbd5cde 100644
--- a/lib/libpthread/pthread_debug.c
+++ b/lib/libpthread/pthread_debug.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_debug.c,v 1.4 2003/03/08 08:03:35 lukem Exp $ */
+/* $NetBSD: pthread_debug.c,v 1.5 2003/04/16 17:37:47 nathanw Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_debug.c,v 1.4 2003/03/08 08:03:35 lukem Exp $");
+__RCSID("$NetBSD: pthread_debug.c,v 1.5 2003/04/16 17:37:47 nathanw Exp $");
#include <err.h>
#include <errno.h>
@@ -150,7 +150,7 @@ pthread__debuglog_printf(const char *fmt, ...)
diff1 = (long)debugbuf->msg_bufw - (long)debugbuf->msg_bufr;
- if (debugbuf->msg_bufw + len > debugbuf->msg_bufs) {
+ if (debugbuf->msg_bufw + len >= debugbuf->msg_bufs) {
cplen = debugbuf->msg_bufs - debugbuf->msg_bufw;
(void)memcpy(&debugbuf->msg_bufc[debugbuf->msg_bufw],
tmpbuf, cplen);