From 13858b88240224ac809dd656c74d39683224dab3 Mon Sep 17 00:00:00 2001 From: Yuri Pankov Date: Tue, 14 Jul 2020 22:43:40 +0000 Subject: [PATCH] top: VIS_SAFE turned out to be unsafe Unset VIS_SAFE flag as it turned out to be actually unsafe for continuos top display as it's passing through sequences resulting cursor movement (backspace, tab, carriage-return), and explicitly set VIS_TAB for the same reason. Reported by: Mark Millard , swills Tested by: Mark Millard , swills --- usr.bin/top/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 476432e5db0c..c7b3e13c700b 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -1016,7 +1016,7 @@ format_next_process(struct handle * xhandle, char *(*get_userid)(int), int flags len = (argbuflen - (dst - argbuf) - 1) / 4; strvisx(dst, src, MIN(strlen(src), len), - VIS_NL | VIS_CSTYLE | VIS_OCTAL | VIS_SAFE); + VIS_NL | VIS_TAB | VIS_CSTYLE | VIS_OCTAL); while (*dst != '\0') dst++; if ((argbuflen - (dst - argbuf) - 1) / 4 > 0)