mirror of
https://gitlab.com/procps-ng/procps.git
synced 2024-11-24 02:24:51 +08:00
49f92f690c
The last time library 'escape' logic was refactored in
the patch referenced below potential problems remained
which have now surfaced. They involve those C1 control
characters especially device control strings (DCS/ST).
Such strings, if not handled by the terminal emulator,
could lead to abnormal behaviors or even some exploit.
So, this commit will now escape the multi-byte control
characters (U+0080 thru U+009f). All single byte ascii
control characters were already treated in this manner.
[ in addition, continuation bytes in utf-8 encodings ]
[ requiring two bytes or more will also be validated ]
And unlike the current code, which will escape all the
remaining non-ascii bytes when some error is detected,
this patch honors remaining valid ascii & utf-8 bytes.
Reference(s):
. Dec, 2020 - 'escape' logic' was refactored *again)
commit
|
||
---|---|---|
.. | ||
include | ||
tests | ||
.gitignore | ||
COPYING | ||
devname.c | ||
diskstats.c | ||
escape.c | ||
libproc2.pc.in | ||
libproc2.sym | ||
meminfo.c | ||
namespace.c | ||
numa.c | ||
pids.c | ||
pwcache.c | ||
readproc.c | ||
slabinfo.c | ||
stat.c | ||
sysinfo.c | ||
uptime.c | ||
version.c | ||
vmstat.c | ||
wchan.c |