svn commit: r363207 - head/usr.bin/top

Yuri Pankov yuripv at FreeBSD.org
Tue Jul 14 22:43:41 UTC 2020


Author: yuripv
Date: Tue Jul 14 22:43:40 2020
New Revision: 363207
URL: https://svnweb.freebsd.org/changeset/base/363207

Log:
  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 <marklmi at yahoo.com>, swills
  Tested by:	Mark Millard <marklmi at yahoo.com>, swills

Modified:
  head/usr.bin/top/machine.c

Modified: head/usr.bin/top/machine.c
==============================================================================
--- head/usr.bin/top/machine.c	Tue Jul 14 22:25:06 2020	(r363206)
+++ head/usr.bin/top/machine.c	Tue Jul 14 22:43:40 2020	(r363207)
@@ -1016,7 +1016,7 @@ format_next_process(struct handle * xhandle, char *(*g
 				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)


More information about the svn-src-all mailing list