]> granicus.if.org Git - procps-ng/commit
skill: Fix double-increment of pid_count.
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:21 +0000 (07:32 +1000)
commit56e696ca5f64de52c25727810321f249bfe5587e
tree3d8bb08a7cbd7d025dfb2da6b6ed90e11d7afd61
parentb019fdba5c9c6a0bca895ae5cf0b2140c0f05041
skill: Fix double-increment of pid_count.

No need to "pid_count++;" because "ENLIST(pid," does it already. Right
now this can trigger a heap-based buffer overflow.

Also, remove the unneeded "pid_count = 0;" (it is static, and
skillsnice_parse() is called only once; and the other *_count variables
are not initialized explicitly either).
skill.c