]> granicus.if.org Git - procps-ng/commit
ps: extend utf8 multibyte support to additional fields
authorJim Warner <james.warner@comcast.net>
Wed, 23 Dec 2020 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@dropbear.xyz>
Mon, 28 Dec 2020 21:48:23 +0000 (08:48 +1100)
commit91897e7d2c161e8819d1dd27b1c50c1fb93a4708
tree7b6e771cfcb94860dd82c75a82d601e91ee1f7af
parente76c773561ff68ad0c2884b86fce12b6733c96f6
ps: extend utf8 multibyte support to additional fields

Form its inception (back in May of 2011), escaped_copy
has always been a flawed function. It does not operate
on 'escaped' strings but instead treats all input as a
regular string incapable of containing utf8 sequences.

As such, it should only be used for strings guaranteed
to NOT embody multibyte characters (like SUPGIDS). For
all other strings, which could contain utf8 stuff, the
correct function should have been that escape_str guy.

So this commit changes nearly every escaped_copy call.

Reference(s):
. May 2011, original escaped_copy (cmdline, cgroup)
commit 7b0fc19e9d28380dc9790615b93bc3653d6d686e

Signed-off-by: Jim Warner <james.warner@comcast.net>
ps/output.c