Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jul 2020 22:43:40 +0000 (UTC)
From:      Yuri Pankov <yuripv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r363207 - head/usr.bin/top
Message-ID:  <202007142243.06EMheoi077338@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@yahoo.com>, swills
  Tested by:	Mark Millard <marklmi@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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007142243.06EMheoi077338>