diff options
author | 2014-10-17 21:27:10 +0000 | |
---|---|---|
committer | 2014-10-17 21:27:10 +0000 | |
commit | d56c607f6379950e126ed3432b8c25ad2c1fb7ec (patch) | |
tree | e1d2204e319847411ea10741fa835aec09c7d6f5 | |
parent | Partial revert of rev. 1.7 (Nov. 21, 2000): (diff) | |
download | wireguard-openbsd-d56c607f6379950e126ed3432b8c25ad2c1fb7ec.tar.xz wireguard-openbsd-d56c607f6379950e126ed3432b8c25ad2c1fb7ec.zip |
Correctly encode half line feed in the output stream for -f;
this patch only changes two bits, note that '\011' != '9' == '\071'.
Bug introduced by the original author, Michael Rendell, and
committed by Keith Bostic on May 22, 1990 (CSRG SCCS rev. 5.1).
The following operating systems are affected: 4.3BSD Reno, BSD Net/2,
4.4BSD, 4.4BSD Lite1, 4.4BSD Lite2, and all versions of 386BSD,
NetBSD, OpenBSD, FreeBSD, DragonFly, Debian GNU/Linux (package
bsdmainutils) and probably many others.
"that's a fun one" millert@, "nice find" deraadt@
-rw-r--r-- | usr.bin/col/col.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/col/col.c b/usr.bin/col/col.c index 26410064d5f..42f4c61f97c 100644 --- a/usr.bin/col/col.c +++ b/usr.bin/col/col.c @@ -1,4 +1,4 @@ -/* $OpenBSD: col.c,v 1.13 2014/10/16 13:45:12 schwarze Exp $ */ +/* $OpenBSD: col.c,v 1.14 2014/10/17 21:27:10 schwarze Exp $ */ /* $NetBSD: col.c,v 1.7 1995/09/02 05:48:50 jtc Exp $ */ /*- @@ -350,7 +350,7 @@ flush_blanks(void) PUTC('\n'); if (half) { PUTC('\033'); - PUTC('9'); + PUTC('\011'); if (!nb) PUTC('\r'); } |