]> granicus.if.org Git - procps-ng/commit
library: strengthen the VAL macro validation functions
authorJim Warner <james.warner@comcast.net>
Mon, 8 Aug 2016 06:23:45 +0000 (01:23 -0500)
committerCraig Small <csmall@enc.com.au>
Mon, 8 Aug 2016 12:01:37 +0000 (22:01 +1000)
commit9f27e9d8d99b1caf870667df41de29e52ca51779
tree7b4ac5a76678c5f91ee734e43f112fe8458ddcd5
parent6b6ad95f40f2e3129e21be40ba9fd2cddba6dfcf
library: strengthen the VAL macro validation functions

One ought not to assume that random memory access will
always succeed or, when it does, that an obviously bad
item enumerator will always be found at that location.

Thus, this patch corrects some really poor assumptions
associated with the 'xtra_procps_debug.h' header file.

[ and it does so in somewhat contorted ways so as to ]
[ avoid several darn gcc -Wnonnull warning messages! ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
proc/diskstats.c
proc/meminfo.c
proc/pids.c
proc/slabinfo.c
proc/stat.c
proc/vmstat.c
proc/xtra-procps-debug.h