]> granicus.if.org Git - procps-ng/commit
top: Check graph_cpus, graph_mems, and summ_mscale.
authorQualys Security Advisory <qsa@qualys.com>
Thu, 1 Jan 1970 00:00:00 +0000 (00:00 +0000)
committerCraig Small <csmall@enc.com.au>
Fri, 18 May 2018 21:32:22 +0000 (07:32 +1000)
commitcd8ba5670e21f8016e14efd247ed2dd6af887aea
tree78cced9360f63ea339c9c54d7e59999c8f5784e2
parentbd91bbf7f12fe34dd1369466c9c2f8d685d3d2fd
top: Check graph_cpus, graph_mems, and summ_mscale.

Otherwise they lead to out-of-bounds reads and format-string bugs.

Since these variables are set/written to in several places (for example,
config_file()), check them in the only place where they are read/used.

Also, constify the static gtab[]s.
top/top.c