diff options
author | imp <imp@FreeBSD.org> | 1996-10-26 00:46:34 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1996-10-26 00:46:34 +0000 |
commit | a5f434cb1c23e7128ef71fb63d55716d7a370e5a (patch) | |
tree | 9b07b39d94bb9d053eb3873d9a8ee0305160f744 /usr.sbin/lpr | |
parent | 0f3443de4a4f934d351e72ef166290c3005c2ca2 (diff) | |
download | FreeBSD-src-a5f434cb1c23e7128ef71fb63d55716d7a370e5a.zip FreeBSD-src-a5f434cb1c23e7128ef71fb63d55716d7a370e5a.tar.gz |
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
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r-- | usr.sbin/lpr/lpr/lpr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/lpr/lpr/lpr.c b/usr.sbin/lpr/lpr/lpr.c index 09ddc2e..4bb3643 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++; } |