]> granicus.if.org Git - procps-ng/commit
library: beef up 'enum pids_item' parameter validation
authorJim Warner <james.warner@comcast.net>
Sun, 30 Aug 2015 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Mon, 31 Aug 2015 07:49:19 +0000 (17:49 +1000)
commiteba58ec17a319e5e6af93df8fe71c0e62aa70388
tree813253e166e0ca814a96b95ff9f92789de100e5c
parente2898e213f4b2ccf5c6b22d68b79aad8cc9c3b5c
library: beef up 'enum pids_item' parameter validation

I was surprised to find that ol' gcc silently converts
a single (different) enum into an address where one or
more enums were expected to be dereferenced. Of course
this was just yet another way to generate an old SEGV.

So this commit will strengthen those parameter checks.

[ we will *not* blame Craig for a failure to consult ]
[ the documentation, since it doesn't even exist yet ]

Reference(s):
http://www.freelists.org/post/procps/newlib-ps-fix,8

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