procps/ps
Jim Warner 05187e4f17 ps: swat insidious bug with the %cpu' format specifier
[ the original newlib commit message(s) appear below ]

----------------------------------------- newlib patch
ps: swat insidious bug with the %cpu' format specifier

Whoa, my head really hurts but this commit should help
with a speedy recovery hopefully, after it is applied.

If the '%cpu' field is used as a format specifier with
that 'o' option, you will encounter a SIGSEGV if there
is also an invalid argument on that same command line.

For example, try 'ps/pscommand -o %cpu,x' with newlib.
With any format specifier other than the '%cpu', there
is an error message, as would happen with '-o pcpu,x'.

For a 3.3.17 version of ps, there's no abend. Instead,
the program will just display a bunch of gobbledygook.
This boo-boo was found to exist as far back as v3.3.0.

[ ok, i am starting to feel very much better already ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
2022-03-15 22:13:44 +11:00
..
common.h ps: add lots of sorting functions 2020-12-22 16:18:17 +11:00
COPYING license: update FSF addresses 2012-03-04 08:04:24 +11:00
display.c ps: ignore SIGURG 2021-10-13 20:47:44 +00:00
global.c Closes: #9 ps: Remove Unix98 output limitations 2015-10-26 11:18:52 +11:00
HACKING docs: remove old information from HACKING 2012-01-13 22:42:38 +01:00
help.c ps: add -q/q/--quick-pid option 2014-07-10 21:24:19 +02:00
output.c ps: extend utf8 multibyte support to additional fields 2020-12-29 08:42:28 +11:00
parser.c ps: eliminated inadvertent trailing double semi-colons 2020-04-10 14:35:17 +10:00
procps.1 Consolidated patch of previously merged CYGWIN support 2017-09-03 20:59:23 +10:00
ps.1 ps: new format option 'exe' now shows executable path if unavail from cmdline 2020-12-22 04:24:57 +00:00
regression procps 010114 2002-02-01 22:47:29 +00:00
select.c ps: Match on truncated 16 char for -C 2020-09-24 22:01:22 +10:00
sortformat.c ps: swat insidious bug with the %cpu' format specifier 2022-03-15 22:13:44 +11:00
stacktrace.c misc: eliminate all those remaining gcc -Wall warnings 2017-05-22 21:34:32 +10:00