]> granicus.if.org Git - procps-ng/commit
top: Harden calibrate_fields().
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:33:15 +0000 (07:33 +1000)
commit6b8b102cf2bdcc175d97d23e9870d0816c0f674e
tree6ea87bb26fcc763c66eafecf52e55f78b0107244
parentc424a643318abfb534a692bd86c6a5e411ed2ebb
top: Harden calibrate_fields().

- Make sure i is at least 1 before "i - 1" and "--i".

- Initialize endpflg (to 0, as it was originally, since it is static)
  before the "for" loop (the "break" may leave endpflg uninitialized,
  for example).
top/top.c