From d1f8ff8c2edf86ccdbe769f1bf87c061ab532ee1 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 26 Oct 1996 00:46:34 +0000 Subject: [PATCH] Fix transcription error I introduced in last patch. This created a fencepost error that would run one off the end of the buffer. Noticed by: Bruce Evans --- usr.sbin/lpr/lpr/lpr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/lpr/lpr/lpr.c b/usr.sbin/lpr/lpr/lpr.c index 09ddc2e39194..4bb3643920df 100644 --- a/usr.sbin/lpr/lpr/lpr.c +++ b/usr.sbin/lpr/lpr/lpr.c @@ -45,7 +45,7 @@ static char copyright[] = #ifndef lint static char sccsid[] = "From: @(#)lpr.c 8.4 (Berkeley) 4/28/95" - "\n$Id: lpr.c,v 1.7 1996/05/11 19:00:55 joerg Exp $\n"; + "\n$Id: lpr.c,v 1.8 1996/10/25 18:14:48 imp Exp $\n"; #endif /* not lint */ /* @@ -471,7 +471,7 @@ card(c, p2) register int len = 2; *p1++ = c; - while ((c = *p2++) != '\0' && len <= sizeof(buf)) { + while ((c = *p2++) != '\0' && len < sizeof(buf)) { *p1++ = (c == '\n') ? ' ' : c; len++; }