NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/55660: col(1): no output if input does not have newlines
>Number: 55660
>Category: bin
>Synopsis: col(1): no output if input does not have newlines
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 14 21:15:00 +0000 2020
>Originator: Rajeev Pillai
>Release: 9.0_STABLE
>Organization:
>Environment:
NetBSD x202e.localdomain 9.0_STABLE NetBSD 9.0_STABLE (GENERIC) #0: Fri Sep 4 18:54:33 UTC 2020 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
If the input supplied to col(1) does not have any newline characters,
then col(1) displays no output:
$ printf 'hello\vworld' | col
$ printf 'hello\rworld\r1\r2\r3\r4' | col
>How-To-Repeat:
See above.
>Fix:
diff -urN a/col.c b/col.c
--- a/col.c 2014-10-18 14:56:14.000000000 +0000
+++ b/col.c 2020-09-14 14:34:10.721099425 +0000
@@ -300,8 +300,6 @@
l->l_max_col = cur_col;
cur_col++;
}
- if (max_line == 0)
- exit(EXIT_SUCCESS); /* no lines, so just exit */
/* goto the last line that had a character on it */
for (; l->l_next; l = l->l_next)
Home |
Main Index |
Thread Index |
Old Index