NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/49291: Problem with half-line feeds in input stream.



>Number:         49291
>Category:       bin
>Synopsis:       Problem with half-line feeds in input stream.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 18 12:30:00 +0000 2014
>Originator:     Henning Petersen
>Release:        NetBSD-current
>Organization:
>Environment:
>Description:
Call the col(1) utility with the -f option, permitting forward
half-line feeds in the output stream, and the input stream actually
contains half-line feeds, you end up with corrupted
output.
From OpenBSD.
>How-To-Repeat:

>Fix:
diff -u -p -r1.17 col.c
--- usr.bin/col/col.c	31 Aug 2011 16:24:57 -0000	1.17
+++ usr.bin/col/col.c	18 Oct 2014 11:55:08 -0000
@@ -368,7 +368,7 @@ flush_blanks(void)
 		PUTC('\n');
 	if (half) {
 		PUTC('\033');
-		PUTC('9');
+		PUTC('\011');
 		if (!nb)
 			PUTC('\r');
 	}



Home | Main Index | Thread Index | Old Index